The CreatorCon Call for Content is officially open! Get started here.

On change() of Work notes(journal field)- Client script

aahitha2
Mega Expert

Hi All,

As we know, we have Work notes(journal) field on incident form.

My requirement:

1. when ever any end user/any user opens and post the work notes then logged user primary role should be populated in activity log.

a). I have u_primary role in user table- which is storing users' primary role.

b).i have same field in incident form to fetch the same role from user table to incident table and same is configured in activity log list to show changes.like below

find_real_file.png

 

when ever logged in user post the work notes using post button, then user role shoulb be populated in activity log.

 

Can any one help me?.

 

Thanks,

Aahitha

6 REPLIES 6

Hi vkachineni,
 
             after typing work notes user will click on post button..user may not save the form..for work notes updation we may not need to save form...Business rule may not helpful for us i guess!!!..
 
Can any one guide me the ways.
 
Thanks,
Aahitha

Try adding a new BR on the sys_journal_field. 

 

 

 

find_real_file.png

 

In the script, query the primary role of the user and add it as a work note 

Be sure to turn off the workflow

gr.setWorkflow(false); to avoid going into a infinite loop.

 

find_real_file.png

 

 

Please mark Correct and click the Thumb up if my answer helps you resolve your issue. Thanks!
Vinod Kumar Kachineni
Community Rising Star 2022