How to pass catalog item variables to email notification

akriti2
Kilo Contributor

Hi all,

I have a multiple choice variable named dual_monitor on a catalog item. It has two values yes and no. Also, It is part of a variable set. Once the user   submits the order an event is fired which will send email notification to the approver to approve the requested item. How do I pass this variable and its value in the notification. I tried various combinations but unable to refer it. Below is email content. Also requested for field appears blank in the notification. Any suggestions?

find_real_file.png.

Thanks & Regards,

Akriti

1 ACCEPTED SOLUTION

I had a small typo. Instead of current.ref_sc_req_item.sysapproval.variables.<variable_name>, try



current.sysapproval.ref_sc_req_item.variables.<variable_name>



The "type casting" comes after, not before. By using "ref_sc_req_item", you are type casting sysapproval reference which is of type task. Using this syntax you can get not just the variables, but any other fields that are specific to the record that is type casted.


View solution in original post

15 REPLIES 15

current.ref_sc_req_item.sysapproval.variables.<variable_name> might actually work. Avoids some scripting.


"ref_<sys_class_name>" tells to resolve the next dot-walk field to be resolved as a record of <sys_class_name> class.


It doesn't work in Fuji . Does this have any known documentation?


I had a small typo. Instead of current.ref_sc_req_item.sysapproval.variables.<variable_name>, try



current.sysapproval.ref_sc_req_item.variables.<variable_name>



The "type casting" comes after, not before. By using "ref_sc_req_item", you are type casting sysapproval reference which is of type task. Using this syntax you can get not just the variables, but any other fields that are specific to the record that is type casted.


Thanks for sharing this as I learnt something new today!



Is this a documented feature though? If it isn't then it would be at risk of not working in future upgrades


Thanks a lot Siva! Works perfectly!!