You need to sign in to do that
Don't have an account?
gregs
Apex describe objects urlDetail
How can i get access to the frontdoor urlDetail, edit and new values for an object from its descibe info in Apex? I don't see this field in the documentation....
can you describe the business case you are trying to solve?
sure, in some apex code i am creating an email that includes a link to he detail page for a custom object i have defined. this link is of the form: https://na3.salesforce.com/{ID} from the urlDetail field i can see if eclipse. in an older version of the scontrol that called my apex code (before describe info was available in apex), here is what I had:
//pass describe info to apex since apex cannot access describe info
var dso = sforce.connection.describeSObject(gApprovalObjType);
var urlDetail = dso.urlDetail;
So what i need to be able to do now is get access to the describe info called "urlDetail" even though I am not seeing where to find it in the new apex describe info documentation. Any ideas on how I can get this?
You have to construct your URL in your Apex code.
String url = '/' + customObject.id;
you don't have to include the na3.salesforce.com, that way if your instance gets moved to a new host your URL wont break.
Currently urlDetail is not in the sObject Describe Result Methods.