I know to get the prefix of object id in apex using the Schema.

But I want to know the way to get the prefix of the object Id in Java Script custom List view button.

Thanks, Suresh.

1 Answer 1


You have to use a global variable $ObjectType:


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.