Case - RITM state synchronization

Javier Tirado1
Tera Guru

I want to synchronize the state changes from RITM to Case (CSM module). You know, when RITM is Pending, Case is Awaiting info; when all RITM are closed, close the Case...

I am looking everywhere to see if this can be made OOB, but I find no documentation or community threads talking about this. I have an idea of how to do it, of course, it's not that difficult, but it's super weird to me that this is not OOB.

What would be your approach to this?

1 ACCEPTED SOLUTION

Alp Utku
Mega Sage

You need to create after Business Rule on Request Item (sc_req_item) table. BR to run on Insert and Update

 

You can also specify conditions for Business Rule to run. Then go to the Advanced tab and write below code as sample

 

 

 

(function executeRule(current, previous /*null when async*/) {
	
	// Create entry into Case table
	
	
	var rec = new GlideRecord(the_name_of_case_table');

	rec.initialize();

	rec.<case_table_field> = current.<ritm_field> ;

// repeat this code for each field you want to reflect from RITM to Case Table
	
	rec.update();
	
})(current, previous);

 

 

View solution in original post

2 REPLIES 2

Alp Utku
Mega Sage

You need to create after Business Rule on Request Item (sc_req_item) table. BR to run on Insert and Update

 

You can also specify conditions for Business Rule to run. Then go to the Advanced tab and write below code as sample

 

 

 

(function executeRule(current, previous /*null when async*/) {
	
	// Create entry into Case table
	
	
	var rec = new GlideRecord(the_name_of_case_table');

	rec.initialize();

	rec.<case_table_field> = current.<ritm_field> ;

// repeat this code for each field you want to reflect from RITM to Case Table
	
	rec.update();
	
})(current, previous);

 

 

Thanks Alp. Yes, that was my first idea and what I ended up doing, but these BRs should already be there with the CSM Request Integration plugin in my opinion.

Thanks for sharing your thoughts!