Skip to content Skip to main navigation Skip to footer

Error Message: “Insert failed. CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY…”

Full Error Message:
“Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, esign.Document: execution of AfterInsert caused by: esign.Template.TemplateException: Target ids passed do not contain necessary id for object type ‘account’. (esign) : [] Error is in expression ‘{!SendForSignature}’ in component <apex:commandButton> in page esign:sendnewdocument: (esign).”

  1. An error like this can happen when trying to “send document for signature” either on auto send or email preview. You can see it refers to “eSign template” which lets you know it is referring to an email template. You can also see the error is referring to first row on object ‘account’ so you can take a look at email template to where you see an account field trying to merge. When reviewing the email template, the merge fields did not have the eSignature app requirement to add “esign_Document__c.” before every field after the {! in the merge field.
  2. Please see the section in our documentation “Configuring Email Template” for more information for how to fix the format of your merge fields in email template.