The CreatorCon Call for Content is officially open! Get started here.

How to copy Demand fields to Project fields

Michael Bachme1
Kilo Guru

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?

27 REPLIES 27

That makes sense. Then what is the purpose of having Parent visible on the form be default?


Well in my personal dev instance it is not visible by default. May I know which version you are on


Helsinki Patch 5


That's weird I'm on Helsinki P4, may be someone in your team might have added it.


So, I created a reference field on the pm_project table for the demand. However, the script to copy the demand # to this field, as well as the demand's business case to the project's short description, still isn't working.



Thoughts?