- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 05:28 AM
Hi Community,
Need help here.
we have in our table 'cmdb_ci_wap_network' brought the field on the form by dot walk i.e "vendor.website"
How do I map the value from the source (u_website) to update in cmdb_ci_wap_network table to the above field vendor.website
Thanks
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2025 06:00 AM
you cannot have dot walked field in field map.
In your existing transform map which is on Target table "cmdb_ci_wap_network" create an onAfter transform script & you can handle this
something like this in onAfter transform script.
(function runTransformScript(source, map, log, target /*undefined onStart*/ ) {
// Add your code here
var sourceValue = source.u_website;
if (target.vendor) {
var vendorRec = target.vendor.getRefRecord(); // give the correct field name for vendor
vendorRec.website = sourceValue; // give the correct website field
vendorRec.update();
}
})(source, map, log, target);
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:26 AM
Thanks Ankur. Yes I saw the records where company field got updated the website got updated.
That was a new learning. Thanks a lot. It worked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:39 AM
Glad to help.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2025 07:26 AM
Hi @Nisha30 ,
In your transform map you need to do 3 things.
1. update the website on company table. In your data sheet you must have vendor name/sysid and vendor's website name.
2. you need to write after TM script which you have already written.
3. Update the vendor on "Wireless Access Point" Table.
-------------------------------------------------------------------------
If you found my response helpful, please consider selecting "Accept as Solution" and marking it as "Helpful." This not only supports me but also benefits the community.
Regards
Runjay Patel - ServiceNow Solution Architect
YouTube: https://www.youtube.com/@RunjayP
LinkedIn: https://www.linkedin.com/in/runjay
-------------------------------------------------------------------------