I need help with an issue I'm facing. In short, I have created a Custom Object with two Record Types. Then created a tab for it and everything works as expected when creating/editing records. The problems start when I override the New/Edit buttons to redirect to my Custom Visualforce pages. I can't find a way to get the CustomObject full id to pass it to the 'ent' url parameter as in the standard page behavior of 'Save&New'. Below is the url from the standard page. I would greatly appreciate any help. Thank you!


I have found one solution here: Finding a Custom Object Id (01I...) to get the Setup page URL But unfortunatelly it does not work for me.

  • If you override the New button make sure the "Skip record type selection page" is not checked...The edit button, typical pattern is to use the Recordtype field on the VF page if you want to give the ability to change it
    – Eric
    Nov 12, 2015 at 14:15

1 Answer 1


Try this:

SELECT CustomObjectId FROM CustomObjectUserLicenseMetrics WHERE CustomObjectName ='[YOUR_OBJECT_NAME]'

  • without any context or explanation, this answer does not prove very useful.
    – glls
    Feb 23, 2018 at 14:07
  • Works for me. Although it does not return any result when running it in packaging org. It must be because "CustomObjectUserLicenseMetrics" does not have any license info in packaging org. YOUR_OBJECT_NAME must be the name without __c. For example if the object name is myNamespace__Object_Name__c. Them pass "Object_Name" to above query Nov 5, 2018 at 5:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .