Business rule issue

thirumala2
Tera Guru

Hi all ,

I have stuck with some instance issue between vancouver and xanadu .

we have a business rule which is working fine in vancouver but in xanadu behaving differently .

please see the screen shots :

 

 

(function executeRule(current, previous /*null when async*/) {
	
	if(current.u_set_up_blotter_qc.changesTo(true))
	{	
		current.work_notes = 'User : '+current.u_user_blotter.getDisplayValue();
		current.work_notes = 'Date/Time : '+current.u_date_time_blotter;
		current.work_notes = 'Set-up Blotter QC : '+current.u_set_up_blotter_qc;
	}
	
	if(current.u_qc != previous.u_qc)
	{
			current.work_notes = 'QC:  '+current.u_qc + '  was  '+ previous.u_qc;
	}
	if(current.u_poa_request_coversheet_qc != previous.u_poa_request_coversheet_qc)
	{
			current.work_notes = 'POA Request Coversheet QC:  '+current.u_poa_request_coversheet_qc + '  was  ' + previous.u_poa_request_coversheet_qc;
	}
	
})(current, previous);

 

 

 

thirumala2_0-1732901329221.png

this same br in vancouver giving result like this :

thirumala2_3-1732901597629.png

 

this same giving multiple results in xanadu upgrade instance :

thirumala2_2-1732901497036.png

Kindly help me how can I get to the root cause issue for this issue:

 

@Ankur Bawiskar @Maik Skoddow  @Chuck Tomasi 

 

1 ACCEPTED SOLUTION

thirumala2
Tera Guru

There was an oob br issue which came in along with some snow patch upgrade which caused this issue and it has been highlighted to snow via hi ticket.

View solution in original post

9 REPLIES 9

Vishnu kumar R
Tera Guru

Hi @thirumala2 ,

 

To sort out this you can try having values stored in a single variable, Try like below

 

if (current.u_set_up_blotter_qc.changesTo(true)) {
    var workNotes = '';
    workNotes += 'User : ' + current.u_user_blotter.getDisplayValue() + '\n';
    workNotes += 'Date/Time : ' + current.u_date_time_blotter + '\n';
    workNotes += 'Set-up Blotter QC : ' + current.u_set_up_blotter_qc;
    current.work_notes = workNotes;
}

 

 

Please mark helpful if it helped with your query,

 

Thanks.

HI vishnu,

thanks for the response even trying that also giving duplicates when record is updated.

thirumala2_0-1732904468987.png

 

Ankur Bawiskar
Tera Patron
Tera Patron

@thirumala2 

did you add logs and verify BR triggered or not?

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi Ankur,

I did , it triggering twice dont know y