You need to sign in to do that
Don't have an account?
CustomField from Tooling api via REST generates error
Hi wizards,
I'm trying to use the tooling API via REST to build custom fields in an existing custom object. No matter how I name the object, I get picklist errors - here's an example:
<?xml version="1.0" encoding="UTF-8"?><Errors><Error><errorCode>INVALID_OR_NULL_FOR_RESTRICTED_PICKLIST</errorCode><fields>TableEnumOrId</fields><message>Entity Enumeration Or ID: bad value for restricted picklist field: a0m</message></Error></Errors>
In that case I passed the key prefix of the object (a0m) as the value of the TableEnumOrId field in the JSON, but I get the same error if I pass the object name, "DonorScape" or "DonorScape__c". Here's my curl call:
curl -b /tmp/cookies.txt -c /tmp/cookies.txt https://na15.salesforce.com/services/data/v28.0/tooling/sobjects/CustomField/ -H 'Content-Type: application/json' -d '{"DeveloperName" : "Test__c" , "FullName" : "DonorScape__c.Test__c" , "TableEnumOrId" : "a0m"}' -H 'Authorization: OAuth <token>' -H 'Accept:application/xml' -X POST
Any ideas? Thanks much!
- Randy