Flow Designer Action script - Updating field in an Action Inputs referenced record

Ron28
Mega Sage

Would anyone know if it is possible to update a field in a record, that was passed to a Flow Designer Action as a reference from a script inside the action?

In an Action, I pass a reference to a requested item record. This record has a field that may need updating.
There is one script step, a Javascript function. The record from Action input is passed to the script via the inputs object.

I can access variables from the passed record directly, accessing variables in the script line inputs.request.whateverField

But would I be able to change the value of inputs.request.whateverField in then save the record somehow?

I started writing the script by doing the usual new Gliderecord('sc_req_item') then get the record via the sys_id and update it, which works ok but for efficiency it might be better to use a record passed rather than retrieving it again.

Thanks
Ron

 

 

1 ACCEPTED SOLUTION

Ron28
Mega Sage

Got it, as the passed record is a glide record the following worked

inputs.request.whateverField = 'hello world'

inputs.request.update()

View solution in original post

1 REPLY 1

Ron28
Mega Sage

Got it, as the passed record is a glide record the following worked

inputs.request.whateverField = 'hello world'

inputs.request.update()