how to save HTML response value in property
Kindly help!
I am calling an external API using HTML. In response I am getting a token, I want to pass that token value in some activity. How can I map the response token from HTML to some property.
Already tried this <%= tools.getPrimaryPage().getProperty("Property name").setValue("value") %> but no luck
Thanks
Hi @YaminiJ3,
First, make sure the property is defined in Pega: Verify that the property (PropertyName) is present in the correct class where you intend to store the token.
Create/Configure the Activity:
Within the activity, employ the Property-Set method to assign the value stored in PrimaryPage.PropertyName.
Utilize this property value as necessary in your activity logic.
Invoke the Activity: Trigger the activity using a button or another event within the section where the HTML snippet is defined. Confirm that the token is established prior to invoking the activity.
Hope it helps
Regards
Raja