Need to make the fields mandatory on parent based on the child table state changes

Aditya253
Kilo Guru

Hi All,

 

Actually, I had a requirement like "If the incident task table state changes to closed then if resolution notes and resolution code fields are in empty in the parent incident of incident task then parent fields should be required for closing incident task". For this, I wrote before br PFB,

 

Table: incident_task.

When: before-update 

Condition-state changes to closed 

Script: current.setAbortAction(true);

gs.addErrorMessage("Please fill the Resolution Notes and Resolution Code in the Associated incident");

 

This requirement is filled by using the above but the issue is, if incident_task table state changes, the fields present in the parent incident should have the mandatory sign beside that like ui policy mandatory logic. How can I achieve this, please help me on this.

 

Thanks & Regards,

Aditya.

 

 

 

 

 

2 REPLIES 2

Aman Kumar S
Kilo Patron

You can't do it using server side script, you have to manage using the error message.

And when you close the incident task, how the incident form will show the message on the incident form, by your BR logic it will still popup on the incident task.
I think there is some confusion here, are you thinking of closing the incident task from form layout or list layout ?

 

Best Regards
Aman Kumar

Hi Aman,

 

Actually, from the form layout I need to close the task.

 

Thanks & Regards,

Aditya.