[4.2] - Getting lookup field name using rbf_getFields()

Posted by IramK on 29-Aug-2016 07:15

Hello,

I am using the rbf_getFields function to retrieve some field values however, I only get the ID of a lookup field. How should I use the field name if I need to retrieve the name of the lookup field value? I don't want to use multiple API calls if possible.

Thanks.

rbf_getFields("account", 12345, "contact", function returned_callback(objName, objId, values) {
var contactID = values["contact"];
var contactName = ??; // How do I get this?
});

Posted by Ranjana sinha on 08-Sep-2016 01:43

Hi Iram,

Yes we have created a bug for this. We are planning a generic API implementation that would fetch record details like id,name ,value etc based based on query. Will update accordingly. Thank you.

Regards,

Ranjana Sinha

All Replies

Posted by Ranjana sinha on 07-Sep-2016 04:23

Hi Iram,

We do not have any Client Side API  that retrieves names directly. The only way is to  make use of selectQuery() API to fetch names based on ids.

Regards,

Ranjana Sinha

Posted by IramK on 07-Sep-2016 04:28

Hello Ranjana,

SelectQuery gets your the name and ID where as rbf_getFields() gets you the ID's. There is no one API call that gets both?

I would like to fetch the name and the ID in one API call preferably.

Kindly let me know.

Cheers.

Iram

Posted by Ranjana sinha on 07-Sep-2016 04:31

Hi Iram,

Unfortunately we do not have one API that does both. :(

Regards,

Ranjana Sinha

Posted by IramK on 07-Sep-2016 05:09

Ok so could you provide possible solutions for both i.e. rbf_getFields(...) with a selectQuery(..) later on to get the name value.

Also another scenario by using selectQuery(..) first to get the main ID and then get all the related ID's and their fields using rbf_getRelatedIds(..) and each record ID's field values?

Iram

Posted by Ranjana sinha on 08-Sep-2016 01:43

Hi Iram,

Yes we have created a bug for this. We are planning a generic API implementation that would fetch record details like id,name ,value etc based based on query. Will update accordingly. Thank you.

Regards,

Ranjana Sinha

Posted by IramK on 08-Sep-2016 03:34

Hello Ranjana,
 
Many thanks for creating a bug and confirming on the generic API implementation. Please do ask me if you require any further information on what would help to get us/anyone in terms of the information returned.
 
So for us, the following would help:
 

1)      Getting the ID (as it is now)

2)      Getting the name (using a #text in the Query)

3)      Getting related ID’s for a particular record

4)      Getting those related ID names, values, codes (if picklists) etc

 
Something similar to the getRecord method in REST API but a bit more of additional functionality.
 
Let me know if you have any questions.
 
Cheers,
Iram
 

Posted by IramK on 21-Oct-2016 04:14

[mention:72a479e40a674b9c88ad814f00b56636:e9ed411860ed4f2ba0265705b8793d05] ,

Any luck on when this new API would be available?

Cheers.

Iram

Posted by Jorrit on 03-Nov-2016 18:34

Hi,

this would be a great feature for server and client side api selectQuery's.

any update on when this would be implmented?

Regards,

Jorrit.

Posted by Ranjana sinha on 04-Nov-2016 03:55

Hi,

Sorry for delayed response. This is still in backlog. Will let you know about fix release version soon.

Regards,

Ranjana Sinha

This thread is closed