How to copy Demand fields to Project fields
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 09:13 AM
When a Project is created from a Demand, how do I copy the Business Case field on the Demand table to the Description field on the Project table?
So far I've copied the Demand Business Rule, "Create Strategic Type on Approve" and added the bolded line but it doesn't seem to work:
function createNewProject(){
var project = new GlideRecord("pm_project");
project.initialize();
project.setValue("short_description", current.short_description);
project.setValue("description", current.business_case); //copy DMND business case to PRJ description
project.setValue("parent", current.sys_id);
Thoughts?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-20-2017 03:09 PM
I highly suggest you not to use the parent field for relating demand and project.
even if you use it, the parent field will not be populated as in there is a rule to not to populate the demand info in parent field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 09:07 AM
I'm not understanding the logic behind why this isn't recommended. Isn't the parent field supposed to specify which record generated the PRJ? In this case the Demand?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 09:54 AM
Add parent field on the project form and try to related a project to a demand manually. You can't, as there is reference qualifier that is filtering the demands
Here is the reference qualifier in dictionary override
javascript:var util = new ProjectManagementUtils(); util.parentRefQual();
The reason is in project there are roll up calculations that are done using the parent field, which is why in OOB there are trying to avoid relating demand and project using parent field.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 12:26 PM
So how do we know what Demand a Project came from?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2017 12:28 PM
Simple solution is to Create a custom field referencing the demand table and populate it..