- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 08:28 AM
The Company field is not inheriting/auto-populating in the SCTASK record even though the field is present in the RITM.
User raises the request and RITM gets created in which the company will get added automatically based on the user.
I have added the same Company field to the task which got created from the RITM. But the value is not getting captured automatically in the 'Company' in SCTASK.
RITM:
SCTASK:
Solved! Go to Solution.
- Labels:
-
Request Management
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 12:51 AM
Hi Amith,
the field is newly created on sc_task or sc_req_item table?
if yes on RITM and if it is populated on RITM level during catalog item submission then it should be visible on task form if you are adding it from dot walk
if above field is newly created on sc_task then you need to set it via script
have before insert business rule on sc_task and have following script
var item = new GlideRecord('sc_req_item');
item.addQuery('sys_id', current.request_item);
item.query();
if(item.next())
current.company = current.request_item.company;
// pick the company to be populated on sc_task from sc_req_item
// current.item is not valid since sc_task doesn't have that field
}
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 08:33 AM
Hi Amith,
Is that field a dot walked field on the form of catalog task from RITM?
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy based on the impact.
Thanks
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 08:51 AM
Hi Ankur,
The field 'Company' is the user's company which is getting populated automatically in the RITM once the request got raised. And the same 'Company' field i added to the SCTASK as well in the Form Layout which can say as dot walked field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-28-2019 09:00 AM
Hi Amith,
Have you created company field as new one on RITM table?
Or is it dot walked field from opened_by user?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-01-2019 12:44 AM
Hi Ankur,
Created as a new one only.
I tried using a business rule 'after' condition in sc_task table:
(function executeRule(current, previous /*null when async*/) {
var item = new GlideRecord('sc_req_item');
item.addQuery('sys_id', current.request_item);
item.query();
if(item.next())
current.company = current.item.company;
}
)(current, previous);
But not working.