- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2022 03:36 AM
Hello Everyone,
Thank you in advance for the help.
I have the scenario for mapping 2 fields from the record producer variable to another table in the backend.
I have used this script in record producer scripting part -
new sn_hr_core.script().funcname(producer.u_position_number,producer.eff);
and this code in the script include but not able to map the field -
ProjectDetailsCreation: function(pos,eff) {
var position = pos;
var effective = eff;
var projDetail = new GlideRecord('tablename');
projDetail.initialize();
projDetail.u_position = position;
projDetail.u_eff = effective;
projDetail.insert();
},
Can you suggest me the right solution?
Solved! Go to Solution.
- Labels:
-
Multiple Versions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2022 04:01 AM
Hi Komaldeep,
I don't think Script Include is required.
You can directly GlideRecord your table in Record Producer script:
var projDetail = new GlideRecord('tablename');
projDetail.initialize();
projDetail.u_position = producer.u_position_number;
projDetail.u_eff = producer.eff;
projDetail.insert();
Please mark this as correct answer and helpful if it resolved, or mark this helpful if this help you to reach towards solution.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-09-2022 04:18 AM
Hi,
you can record producer script directly for this
Script shared by Anubhav should work fine
Do share us the updates.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader