How to set values in when the record is in related list

NaveenKumarSN
Tera Expert

Hi,

 

 

In the below related list approvers tab is there. in that tab approver records are there so i need to set approved where requested is available.

 

I need to add test step for that so please guide which step i need use.

 

1. Related List

NaveenKumarSN_0-1730459417131.png

2. File value

NaveenKumarSN_1-1730459436760.png

 

8 REPLIES 8

abhi159
Kilo Sage

Hi @NaveenKumarSN ,

use the run server side script in test steps.

 

Please mark this response as correct or helpful if it assisted you with your question.

NaveenKumarSN
Tera Expert

(function executeRule(current, previous /*null when async*/) {
// Check if the state is "Requested"
if (current.state == 'requested') {
// Update the state to "Approved"
current.state = 'approved';
current.update();
}
})(current, previous);

 

Please check and confirm the script

AbdulNow
Tera Guru

Hi @NaveenKumarSN  Could you please explain your request more in detail ? Like the use Case or requirement ?

Hi Wahid,

 

My requirement is i need to approve what ever the regards in available in Approvars related list.

 

Please refer above attached images