[4.0.4.0] - Getting the ID of a related record using the #id token - Forum - Rollbase - Progress Community

[4.0.4.0] - Getting the ID of a related record using the #id token

 Forum

[4.0.4.0] - Getting the ID of a related record using the #id token

This question is not answered

Hello,

I am trying to get the id of a related record using the {!R1232234.testField#id} token on a popup.jsp page. This is not a main.jsp page. When I try to get the id using the above token, it returns "[J@7ec9d6b2" as the return value. When I just try the token without the id suffix: {!R12322234.testField}, it gives me just the text value. What is the best/quickest way of getting the ID in this scenario? For some reason the tokens don't work the same way in a popup.jsp page in comparison to a main.jsp page. Any suggestions on how I can achieve what I want?

Cheers.

Iram

All Replies
  • Is testField  a Lookup field?

    Is this on the "eap.rollbase.com" site?

  • Hello Karthikeyan,

    No it is not a lookup field. Its a record name's "Related Field". This isn't on eap.rollbase.com, I've mentioned it in my title that its on version 4.0.4.0.

    Iram

  • Hello Iram,

    Can you share an example of this usage (a screenshot will be good.) ?
    Can you check if this repeatable on the EAP (since you already have a test case)?

    Thank you.
  • So basically I have a related field called "Trading Currency" (screenshot attached). The code that I am using to retrieve the ID is given below. Let me know if you have any more questions.

    Code:

    {!#LOOP_BEGIN.R551091#551050}
    alert("{!R551091.tradingCurrency}"); // returns the name of the record
    
    alert("{!R551091.tradingCurrency#id}"); // returns '[J@7ec9d6b2' in popup.jsp pages
    {!#LOOP_END.R551091}