• Bruce Greer
  • NEWBIE
  • 0 Points
  • Member since 2015

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 2
    Replies
I have working code that I use to create batches of new Contacts using input data in a CSV-formatted file.  The Contact column names are in the first row of the file, followed by one or more rows containing the values for each Contact that I need to create.  The working version of the code does not specify the OwnerId of the new Contact, so each Contact created is assigned to the default Owner value, which is the admin user that created the API session.

I need to modify the logic to assign a different Owner to the new Contacts that are created.  I found this section in the documentation, where it specifically refers to the "Owner" relationship.  I added "Owner.Id" as a new name to the first row of the CSV file, but when I attempt to create a new Contact, the upload fails with the message "InvalidBatch : Unable to find relationship:  Owner".  "Owner" is the name of the relationship that I can use successfully in the query, why doesn't it work in the batch create?

Does anyone have an idea about what I could be doing wrong?

Thanks for you time!
How do I use the Metadata API to add a new picklist value to a standard field that already has many custom values.  Specifically, I do not want to overwrite the picklist because that would delete the custom values.  I just want to add a single new value to the list.
I have working code that I use to create batches of new Contacts using input data in a CSV-formatted file.  The Contact column names are in the first row of the file, followed by one or more rows containing the values for each Contact that I need to create.  The working version of the code does not specify the OwnerId of the new Contact, so each Contact created is assigned to the default Owner value, which is the admin user that created the API session.

I need to modify the logic to assign a different Owner to the new Contacts that are created.  I found this section in the documentation, where it specifically refers to the "Owner" relationship.  I added "Owner.Id" as a new name to the first row of the CSV file, but when I attempt to create a new Contact, the upload fails with the message "InvalidBatch : Unable to find relationship:  Owner".  "Owner" is the name of the relationship that I can use successfully in the query, why doesn't it work in the batch create?

Does anyone have an idea about what I could be doing wrong?

Thanks for you time!
How do I use the Metadata API to add a new picklist value to a standard field that already has many custom values.  Specifically, I do not want to overwrite the picklist because that would delete the custom values.  I just want to add a single new value to the list.