When a Demand is created from IDEA, IDEA Category value should be copied over to Demand record.

prash4
Tera Expert

When a Demand is created from IDEA portal, IDEA Category value should be copied over to Demand record.

 

i have created a reference field called 'category' in idea table using reference table as (im_category). now when a user convert idea to demand then this category field should carry over to demand form.

 

how can I achieve this. please help!!!

 

1 ACCEPTED SOLUTION

Aniket Chavan
Tera Sage
Tera Sage

Hello @prash4 ,

Got your requirement, now just let me know that how you are converting the Idea record into Demand? so that I could help you accordingly.
For example in our system we are using OOB "Accept" UI action to convert the Idea record into the Demand, so we have added all the mappings in the UI action code itself, so likewise if you also using the same UI action way to convert then you can also add the code something like below:
Accept UI Action:

var grDemand = new GlideRecord('dmn_demand');
grDemand.addQuery('idea', current.sys_id);
grDemand.query();
if (grDemand.next()) {
    grDemand.category= current.u_idea_category;// replace with your actual values if not same
 grDemand.update();

 

Please let me know your views on this and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

View solution in original post

2 REPLIES 2

Aniket Chavan
Tera Sage
Tera Sage

Hello @prash4 ,

Got your requirement, now just let me know that how you are converting the Idea record into Demand? so that I could help you accordingly.
For example in our system we are using OOB "Accept" UI action to convert the Idea record into the Demand, so we have added all the mappings in the UI action code itself, so likewise if you also using the same UI action way to convert then you can also add the code something like below:
Accept UI Action:

var grDemand = new GlideRecord('dmn_demand');
grDemand.addQuery('idea', current.sys_id);
grDemand.query();
if (grDemand.next()) {
    grDemand.category= current.u_idea_category;// replace with your actual values if not same
 grDemand.update();

 

Please let me know your views on this and Mark Correct if this solves your query and also mark 👍Helpful if you find my response worthy based on the impact.

 

Thanks,

Aniket

Omkar Kumbhar
Mega Sage
Mega Sage

Hello @prash4 ,

Please create the on Before BR on insert on Demand table 

and Add the script

GlideRecord to idea table and assign the idea category value to demand category value.

 

Thank you,

Omkar

If I was able to help you with your case, please click the Thumb Icon and mark as Correct.