Skip to main content
1-Visitor
Dec 17, 2014 8:21 PM UTC
Solved

Add a Custom Attribute to a specific task in Workflow

Is there an easy way to add a custom attribute only to a specific task in a workflow? For example, in the OOTB Change Notice workflow there is an Audit task. How would I add an attribute to this task only?

-Ryan

1-Visitor
Dec 30, 2014 6:46 PM UTC

ok then change the set statement to

obj.set("IFRQ_Number", IFRQ_Number);

13 replies

12-Amethyst
Dec 18, 2014 3:27 PM UTC

You can create variable in Task:

1.jpg

Translate
rhermann1-VisitorAuthor
1-Visitor
Dec 18, 2014 3:30 PM UTC

Awesome. I actually got this far on my own. Next I want to take that variable information and map it back into an attribute on the change notice that way it is visible on the details of the change.

Any idea what the code for this is?

Translate
1-Visitor
Dec 18, 2014 5:21 PM UTC

It ends on what version you're on... LWCNormalizedObject is the API to use for earlier versions, for 10.2 and beyond use PersistableAdapter. See the JavaDoc for your version for code samples

Translate