Client Script vs Flow Designer Flow on Record Producers

Dan13
Tera Expert

I am working on cleaning up our business rules, flows, and client scripts that we are using on our Record Producers. I found that we have several flows that are doing the same thing as our client scripts. The client scripts were created by our managed service provider (I have very little knowledge around scripting) and the flows were created by me.

 

My question is, are client scripts or flows better for modifying RP's after they are submitted?

 

Example of a client script:

Dan13_0-1672253775327.png

 

Example of a flow doing the same:

Dan13_1-1672253837848.png

 

1 ACCEPTED SOLUTION

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
Client script is working at client end ie on your browser, it is just give you the view the values are getting changed before saving the database, end user can alter the values manually.

Flow is setting the value directly on database(server), this is server side script.

Client and Server-side Programming — ServiceNow Elite


 

 


Thanks and Regards,

Saurabh Gupta

View solution in original post

2 REPLIES 2

Saurabh Gupta
Kilo Patron
Kilo Patron

Hi,
Client script is working at client end ie on your browser, it is just give you the view the values are getting changed before saving the database, end user can alter the values manually.

Flow is setting the value directly on database(server), this is server side script.

Client and Server-side Programming — ServiceNow Elite


 

 


Thanks and Regards,

Saurabh Gupta

cp11
ServiceNow Employee
ServiceNow Employee

Keep in mind that flows are async activity and they could possibly sit in the queue waiting for it to be processed. Client scripts are used to immediately run on the client side, so in this case the client scripts seem to be appropriate. Dont know your entire business need, but based on what you have it seems like the client scripts should work