web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Service | Customer Service, Contact Center, Fie...
Suggested Answer

How to get value of workflow context variables in a entity form

(0) ShareShare
ReportReport
Posted on by 5

Hello,
First of all, I've created an IVR in which I retrieve information and store it in a "VarTest" variable.

In my workflow, there are context variables that have exactly the same name as the one in the IVR where I saved the information.
And now that the desired value is in my context variable, I'd like to retrieve it in a JS script in order to put this value in a form field of the conversation entity.
I was thinking of using :

function onLoad(context){

    console.log("Start script");

    var formContext = context.getFormContext();

    console.log(formContext.getAttribute("VarTest"));

And then exploit the value

but he return "null" everytime, so is it possible to do that ? 

I have the same question (0)
  • Suggested answer
    Adrian Begovich Profile Picture
    1,027 Moderator on at

    Hi Elouan,

    One option is to store the value of the VarTest variable in a field and then retrieve the value of the field in your JavaScript code.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Service | Customer Service, Contact Center, Field Service, Guides

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 57 Super User 2025 Season 2

#2
Daniyal Khaleel Profile Picture

Daniyal Khaleel 34 Most Valuable Professional

#3
Scott Jackson UK Profile Picture

Scott Jackson UK 22

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans