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

Posted by IramK on 24-May-2016 05:22

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

Posted by Karthikeyan Bhaskaran on 24-May-2016 07:53

Is testField  a Lookup field?

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

Posted by IramK on 24-May-2016 09:21

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

Posted by Karthikeyan Bhaskaran on 01-Jun-2016 00:07

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.

Posted by IramK on 01-Jun-2016 03:40

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}

 

This thread is closed