0

When trying to UPDATE CustomObject with newly added custom field, I get this error message: TestCustomObject__c.AccountNumber_NEW__c: (INVALID_CROSS_REFERENCE_KEY, In field: fullName - no CustomField named TestCustomObject__c.AccountNumber_NEW__c found)

Sample code looks like this:

custom_object = mdapi.CustomObject.read(custom_object_fullname)
custom_field = mdapi.CustomField(
                        fullName="AccountNumber_NEW__c", description="Not used"
                    )
                    new_fields = [custom_field]
custom_object.fields += new_fields
mdapi.CustomObject.update(custom_object)

Any idea, what I'm doing wrong here? Thanks.

4

0

You must log in to answer this question.

Browse other questions tagged .