can fields be invoked - current.variables.fieldName on Incident when created from Record producer

Rukmini34
Mega Contributor

I have filled variable 'Alternate email' on record producer and submitted the form.Incident got created.I need to get the value of Alternate email on Incident but we dont have map the field option enabled or am not using script field on record producer.

Can this be acheived using below code on Incident table-Business rule

var alternateEmailVariable= current.variables.u_alternate_email;               
current.u_alternateemail=alternateEmailVariable;

 

using current.variables.fieldName on incident table is valid?

2 REPLIES 2

Eswar Chappa
Mega Sage
Mega Sage

Hi @Rukmini34 

 

Please check the below article which was related your use case!

https://www.servicenow.com/community/developer-articles/record-producer-map-to-field-on-variable-set...

Thanks & Regards,

Eswar Chappa

Mark my answer correct and Helpful if this helps you ðŸ˜€

Stefan Georgiev
Tera Guru

Hello @Rukmini34 ,

the fast answer is yes, you can do that with a script on the record producer, you just need to use this code on the Record producer Script field :

 

current.u_alternateemail = producer.u_alternate_email;

 
but it is going to be better if you check the Article that @Eswar Chappa added and see how everything works.

Hope that this helps you!

If the provided information answers your question, please consider marking it as Helpful and Accepting the Solution so other community users can find it faster.

All the Best,
Stefan