Skip to main content 画期的なソリューションを構築する Agentforce ハッカソンに参加して、優勝賞金 5 万ドルの獲得を狙いましょう。今すぐ登録。諸条件が適用されます。
Hi, 

I've been working with the Meta API for few days and noticed that my custom fields created via API are not visible in the "Describe" resource of the REST API "/services/data/v38.0/sobjects/MyCustomObject__c/describe" however, I can see the custom fields created in the Setup -> Create -> Custom objects view inside my salesforce instance. Is there some update TTL for this type of changes? or there is some attributes in the Custom Field that needs to be set to enable it. Or it is just not possible to use REST API and META API together?

I am using the JAVA api library:

com.force.apiforce-metadata-api-38.0.0

And adding custom field code is the following (simplified):

CustomField field = new CustomField();

field.setType(FieldType.Text);

field.setDescription(description);

field.setLabel("answerid");

field.setFullName("answerid__c");

field.setLength(lenght);

customObject.setFields(new CustomField[] {field});

UpsertResult[] results = metadataConnection.upsertMetadata(new Metadata[]{ customObject });

It returns a success result, and as I commented, I able to see the field in the tool, however, I cannot use the field when creating instances of the custom object, and it does not show up in the REST API "describe" resource of my custom object.

Is there something I am missing ??

 
1 件の回答
0/9000