Portfolio does not populate onto the Idea form - Record Producer

Vaishnavi35
Tera Guru

Hi,

I have created a Record Producer with "select box" variable. I have added choices manually.

Vaishnavi35_0-1717584359953.png

 

On the "Idea" form we have "Portfolio" field. Its a reference field.

Vaishnavi35_1-1717584422487.png

 

 

Whatever value I am giving on the Record producer I want it to go on the Idea form.

current.portfolio = producer.portfolio; - this script does not work on the RP record
 
"Map field" is also not working.
 

 

 

 

Thanks,

Vaishnavi

 

1 ACCEPTED SOLUTION

AshishKM
Kilo Patron
Kilo Patron

Hi @Vaishnavi35 , 

As per all details given here, it looks that the local select box value ( from question_choice ) table are mapped with portfolio field on Idea table which is giving this overall issue becuase selec box value's has different sys_id than Profile [ pm_profile ] tabe.

 

Workarround :

You can write gliderecord query over pm_profile table and get the profile record sys_id based on selected profile on record producer using the below code.

 

current.portfolio = getPortfolio(producer.u_portfolio);

// Funtion to  return selected portfolio record's sys_id
function getPortfolio(protf){
 var grPorfolio = new GlideRecord("pm_portfolio");
     grPorfolio.addQuery("name", portf );
     grPorfolio.query();
     if(grPorfolio.next()){
       return grPorfolio.sys_id;
     } // if closed
} // function closed

 

AshishKM_0-1717607633264.png

 

-Thanks,
AshishKM

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

6 REPLIES 6

AmarjaD
Tera Contributor

Since its a Idea record producer and you want to map the portfolio on the front end to the back end Idea form, I would suggest you to map that field on the dictionary level of the filed by setting map to filed as true and than adding the backend filed on the field value.

I am already trying to "Map field" , but it does not work.

 

map to filed as true and than adding the backend filed on the field value - I did not understand what you meant here?

 

Thank you for the help!

AmarjaD
Tera Contributor

when you set the map filed true on the record producer field, it would ask you what filed on the back end (idea form) would you like to map the filed to, if you select the filed on there, it automatically maps to the back end and you will not have to use the client script

 

Its not working. Is it because its an OOB field? Not sure.