How to set the value of a Reference Record programmatically? - Forum - Rollbase - Progress Community

How to set the value of a Reference Record programmatically?

 Forum

How to set the value of a Reference Record programmatically?

This question is answered
Hi Guys,
 
I have a Refence Record field, and who like to set it to the Record in Scope.
Since this is not an option on the Reference Record field, I’m trying to set it programmatically.
/cfs-file/__key/communityserver-discussions-components-files/25/0027.image002.png
 
If I set it using rbf_setFieldValue to the Id of the Parent Record, it shows the id instead of the value
/cfs-file/__key/communityserver-discussions-components-files/25/7360.image004.png
 
Regards,
http://www.aigs.co.za/templates/email_signatures/2016/stephen_van_rooyen.png
 
 
Verified Answer
  • What I meant is when you view that record after submission you will see value and not ID for Reference Record.

    Regards,

    Shiva

All Replies
  • Hi Stephen,

    I have filed a defect for this #61422.Thanks for brining this to our notice.

    However you could still go ahead and use that API because when form is submitted value gets stored instead of ID.

    Regards,

    Shiva

  • What I meant is when you view that record after submission you will see value and not ID for Reference Record.

    Regards,

    Shiva

  • Hello,

    I think I've a similar problem..., programmatically setting the Reference Record from the UI.

    My Object C has the Reference Record field. My Objects A and B are both related to C and are included as Selected Objects in the Reference Record list.

    I find I can use rbf_setFieldValue to set the Reference Record to an A object record but not a B object record. Co-incidentally the UI dropdown defaults to Object A possibly because it sorts as the first in the list.

    Is there a solution / api that will allow me to set the Id of any object record in the Reference Record list?

    Regards

    --

    Charles