You need to sign in to do that
Don't have an account?
bz880
Possible AJAX toolkit bug?
I'm looking at the DescribeSObject call and it's relation to the Ajax toolkit. In my use case, I want to use the DescribeSObject to see if the Opportunity is createable. When I use the Ajax toolkit and call DescribeSObject, the response xml contains an element as such.
true.
However, when I access this field from javascript, as such
var objDesc = sforceClient.DescribeSObject("Opportunity");
alert(objDesc.createable)
it will always return false.
To further validate my point, when I use the SForce Explorer and describe Opportunity, the createable will always equal false for the Opportunity Object.
Has anyone seen anything like this before? Is there a workaround?
Thanks
Baldwin
true.
However, when I access this field from javascript, as such
var objDesc = sforceClient.DescribeSObject("Opportunity");
alert(objDesc.createable)
it will always return false.
To further validate my point, when I use the SForce Explorer and describe Opportunity, the createable will always equal false for the Opportunity Object.
Has anyone seen anything like this before? Is there a workaround?
Thanks
Baldwin
The response XML contains.
<createable>true</createable>
I forgot to escape the html in the message above.
I have the same behavior, but I can still create Opportunity objects.
The line:
2245 this.createable = Sforce.DOM.GetBool(Sforce.DOM.GetElementValue (soap, "creatable"));
Seems to have a typo: "createable".
I think that might do the trick?
Steve.
Thanks for the excellent info.