I am working in a sandbox, and using the Tooling API. I need to update the metadata of the custom field in Salesforce, but I am unable to do so. For this I am trying to work on the PATCH method. Below is the postman request i have used to update the custom field metadata:
Method:
PATCH
URL:
https://cs21.salesforce.com/services/data/v34.0/tooling/sobjects/CustomField/customfieldid
HEADERS:
Authorization : Bearer TOken
Content-Type : application/json
Body:
{
"FullName":"Contact.AFMO_Account__c",
"Metadata":
{
"description": "test"
}
}
Best Answer
The following worked for me as a PATCH via Workbench:
/services/data/v41.0/tooling/sobjects/CustomField/00N70000002kxvG
I haven't gone through all the permutations, but if you take away fields such as
precision
you start getting errors such as: