Business Rule is not setting the reference field value

aagman4
Tera Contributor

I am trying to populate the field 'SAD Assessment'(u_sad_assessment) with a value(suppose RASMT00100092) but it's not populating, it remains blank.

This field is of simple reference type on table - sn_risk_advanced_risk_assessment_instance.

 

Business Rule script - 

aagman4_2-1691131305221.png

 

 

SAD Assessment Dictionary Configuration - 

aagman4_1-1691131240003.png

 

Please help me on this.

4 ACCEPTED SOLUTIONS

Harish KM
Kilo Patron
Kilo Patron

Hi, Reference field will look for sysid but here your passing sadAssess.number as a value to set. You need to pass the sysId

Regards
Harish

View solution in original post

NaveenGN
Tera Expert

Check the display value of the table and try to use getUniquevalue() instead of sadAssess.number; in setValue

View solution in original post

Jaydee1
Tera Guru

Hi @aagman4 ,

 

Instead of setting number can you try setting sys_id. try following code on line number 9 : 

 

current.setValue('u_sad_assessment', sadAssess.getUniqueValue());

 

Please mark helpful and accept solution if it resolves your issue.

 

Thanks,

Jaydee

 

 

 

View solution in original post

Rahul Talreja
Mega Sage
Mega Sage

Hi @aagman4 ,

Try Using,

current.setValue('u_sad_assessment', sadAssess.getUniqueValue());

current.update();

 

 

Please mark my response correct/helpful as applicable!
Thanks and Regards,
Rahul

View solution in original post

4 REPLIES 4

Harish KM
Kilo Patron
Kilo Patron

Hi, Reference field will look for sysid but here your passing sadAssess.number as a value to set. You need to pass the sysId

Regards
Harish

NaveenGN
Tera Expert

Check the display value of the table and try to use getUniquevalue() instead of sadAssess.number; in setValue

Jaydee1
Tera Guru

Hi @aagman4 ,

 

Instead of setting number can you try setting sys_id. try following code on line number 9 : 

 

current.setValue('u_sad_assessment', sadAssess.getUniqueValue());

 

Please mark helpful and accept solution if it resolves your issue.

 

Thanks,

Jaydee

 

 

 

Rahul Talreja
Mega Sage
Mega Sage

Hi @aagman4 ,

Try Using,

current.setValue('u_sad_assessment', sadAssess.getUniqueValue());

current.update();

 

 

Please mark my response correct/helpful as applicable!
Thanks and Regards,
Rahul