3

Use Case:

  • Approval Process on custom object
  • Approval Assignment Email Template: Visualforce

User clicks Submit for Approval, SFDC responds with Internal Server Error.

Question will be self-answered as a service to the community.

3

Fortunately, SFDC Help had the clue, pointing me to an issue with the VF email template

  1. Prior to bug report, Submit for Approval was working fine
  2. VF template had markup like below:

     <apex:outputText value="{!$ObjectType.Foo__c.fields.Industry__c.Label}"/>
     <apex:outputField value="{!relatedTo.Industry__c}"/> 
    

Developer then deleted field Foo.Industry__c. SFDC does not tell you that the field is being used in a VF Email template in the way above - no warning.

When Submit for Approval is then clicked, the gack ensues because, after Industry__c was deleted, the VF markup looks like the below:

     <apex:outputText value="{!$ObjectType.Foo__c.fields.00NR0000001Zu8o.Label}"/>
     <apex:outputField value="{!relatedTo.00NR0000001Zu8o}"/> 

where 00NR0000001Zu8o is the id of the deleted field

Solution is to fix the VF email template and remove the offending, deleted field.

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.