每当我们发布软件的新版本时,我都需要向 Opportunity 对象中的自定义 Picklist 添加一个选项。
let metadta = [{
"fullName": "Opportunity.Custom_Picklist__c",
"label": "Custom Opportunity Picklist",
"valueSet": {
"restricted": "true",
"valueSetDefinition": {
"sorted": "false",
"value": [
{
"fullName": "Option1",
"default": "false",
"Label": "Option 1"
},
{
"fullName": "Option2",
"default": "false",
"label": "Option 2"
}
]
}
}
}];
conn.metadata.update('CustomField', metadata, function(err, results) {
if(err) console.log(error);
if(results) console.log(results);
});
我已经尝试了我能想到的所有变化来更新它,无论我做什么,我都会收到这个错误:
{
"name": "soapenv:Client",
"errorCode": "soapenv:Client"
}