I am trying to update an email send definition with a sender profile via the c# SOAP API library. I have my email send definition object, and I have a sender profile object. I'm assigning the sender profile to the esd.SenderProfile property, and then I perform the update call. I get error code 2, which is the generic "unexpected error" exception.

Any thoughts on this? The code is pretty simple, but some snippets are below to help with troubleshooting.

Adding the Sender Profile to an existing Email Send Definition:

SenderProfile selectedSenderProfile = (SenderProfile)lvwSenderProfiles.SelectedObject;
esd.SenderProfile = selectedSenderProfile;

Then the ESD object eventually makes its way to the update call:

m_exactTargetFramework.Update(new UpdateOptions(), new APIObject[] { esd }, out requestId, out status);
  • You haven't really provided enough details for anyone to help you. Do you have some code you can post? Oct 11, 2016 at 18:17
  • Hi @AdamSpriggs - thanks for the input. I added some code snippets, hope they help with identifying the issue. If there is additional info that may be helpful, I'll be happy to provide that.
    – Mike
    Oct 11, 2016 at 19:25
  • Are you setting the SendClassification? The SenderProfile is a property of that Object. Oct 11, 2016 at 19:31
  • There are several other discussions on SFSE about creating send definitions with a classification: salesforce.stackexchange.com/… Oct 11, 2016 at 19:34
  • Thanks @AdamSpriggs. I figured it out, and it was amateur hour on my part. I am retrieving an existing ESD, and was using that object for the update with no other modifications than the new sender profile. The light bulb went off that the property "IDSpecified" would not be set to true, and therefore the update will not work. Once I set that property to true, the update worked. Thanks for the help!
    – Mike
    Oct 12, 2016 at 15:45

1 Answer 1


The "ObjectID" and "IDSpecified" properties of the object to be updated needs to be set for update calls to work properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.