Learn about Redwood and be one of the first to join the conversation

Visit Redwood Community
Retrieve ID from a custom object (Javascript) — Cloud Customer Connect
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

Retrieve ID from a custom object (Javascript)

Accepted answer
24
Views
10
Comments
edited Jun 13, 2022 4:06AM in General Technical Discussions 10 comments

Content

Hi! I'm trying to retrieve the ID value from a custom object, but I'm getting 'undefined'

var co = window.external.GetCustomObject('MATRIZ', 'MAT_MRFT'); 
​var idRegistro = co.GetCustomFieldByName('ID');

I've already tried this:

var idRegistro = co.GetCustomFieldByName('Id');

and

var idRegistro = co.ID;

and

var idRegistro = co.Id;

and

var idRegistro = co.GetCustomFieldByName('c$ID');

How can I get this value? Thanks!

Howdy, Stranger!

Log In

To view full details, sign in.

Register

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