You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

How to retrieve ID field of a Custom object using Javascript API

Accepted answer
23
Views
11
Comments
edited Jun 3, 2016 7:42AM in UI Extensibility 11 comments

Content

Hi All,

I have a Custom Object workspace and would like to run a script(using Javascript API) on it that accesses the ID value of the Object along with other custom fileds in it.

var co= window.external.GetCustomObject("co", "test");
         var f1= co.GetCustomFieldByName("field1");
         var f2 = co.GetCustomFieldByName("field2");
         var f3 = co.GetCustomFieldByName("field3");
         var id =  co.GetCustomFieldByName("ID");

 

fields f1,f2,f3 are retrived succesfully but id returns undefined.

 

Could anyone help.

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!