- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
5 hours ago
Hello,
we've added some custom fields to pm_prject, and added the same fields ( same names) to the demande table.
is it possible to copy those fields from demand to project while using the ui action "create project" ?
thank you
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
there is no property etc which controls this.
the fields to copied are hard-coded and not controller from system property
2 ways
1) update the OOTB script to add your custom fields
OR
2) use before insert BR on project table to set your custom fields from Demand (Recommended way)
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
4 hours ago
Hi @ammar_k ,
OOB there is no property defined which you can use to copy additional values, however you can create a before BR on project table, glide record demand record and set the required fields.
Thanks
Anand
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 hours ago
In the out of box UI Action you can do this within the if block that starts on line 21. Just add a line for each field, followed by an update on the GlideRecord using 'current' to refer to the demand record from which the UI Action was executed, and 'project' to refer to the newly created project record such as:
project.u_field1 = current.u_field1;
...
project.update();
You can also / instead create a Business Rule on insert of the project table to do something similar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
there is no property etc which controls this.
the fields to copied are hard-coded and not controller from system property
2 ways
1) update the OOTB script to add your custom fields
OR
2) use before insert BR on project table to set your custom fields from Demand (Recommended way)
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
3 hours ago
Yes, it’s possible. When you use Create Project UI action, it runs server-side logic (usually in a Script Include like DemandToProjectHelper). You can extend that script to map your custom fields.
Steps:
Go to the UI Action Create Project (on demand table).
Check what Script Include it calls (commonly DemandToProjectHelper.createProjectFromDemand).
Clone/extend that function and after project is created, copy values:
// inside your helper
project.your_custom_field = demand.your_custom_field;
project.u_another_field = demand.u_another_field;
project.update();
Test by creating a project from a demand and confirm values flow across.