How can I access case record values in script

samadam
Mega Sage

I am building a flow to run every day and check for cases that meet certain conditions. In the for each loop for the cases I am adding approval for each record found. I am trying to set the due date for approval but unable to get the variables.

I tried using the following but doesnt work.

fd_data.trigger.current.subject_person_hr_profile but it doesnt work. Is there a way to access the data from script?
4 REPLIES 4

GlideFather
Tera Patron

Hi @samadam 

 

what's the requirement?

 

Perhaps you can do this without a single line of code while using a flow...

 

EDIT: I was confused as you talk about approval due date and then HR profile...

you can create a flow variable in the top right corner in your flow, that's very powerful thing and this variable can be (re-)used in your flow

_____
Answers generated by GlideFather. Check for accuracy.

samadam
Mega Sage

I need to get the value of end_date from HR profile of the subject person on case and populate that as due date on approval. 

@samadam And if you try to retrieve it in a background script, does it work for you?

Prepare it there and once you have it (I don't know the formats, types etc.), then you can call it from the flow variable

_____
Answers generated by GlideFather. Check for accuracy.

Rafael Batistot
Kilo Patron

Hi @samadam 

May you try use:

fd_data.trigger.request_item.variables.subject_person_hr_profile.getDisplayValue();

 

If this response was helpful, please mark it as Helpful and, if applicable, as Correct, this helps other users find accurate and useful information more easily.