I am using the SOAP API to load data for multiple SObject types into a completely new Developer sandbox.
I have manually added external ids to many of the objects through the native interface so that I can use them to create relationships when loading my records.
However, I would like to create these external ids through code at the start of my program, but am not sure of the best way of doing this. If I create a new field via an API, then that field won't be in the WSDL that I have downloaded, so I won't be able to use methods such as `account.setAccExtId__c()' without updating the WSDL, but this is what I want to do.
- Is there a way of adding a field via an API and then immediately being able to use getters and setter for that field in my Java code?
- Can we only add a field via the MetaData API? I have been using the SOAP API for uploading and deleting records.
Thanks
Best Answer
Good question!
The following is from the Salesforce docs relating to the Enterprise WSDL...
The following describes the Partner WSDL...
So while the Partner WSDL may not be as friendly to use, it is better for more dynamic use cases such as yours.
Hope this helps!