• Raghvendra Jha
  • 0 Points
  • Member since 2015

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
  • 0
I'm making describe call related to page layout fields on object 'Account/Contact' so as to get all the page layout fields on our custom visual force page. As a result of that , I'm getting all the page layout fields except fields with data type "Roll up summary". Is this is the limitation of salesforce page layout describe call. I'm using the below code.
var ObjectName='Account';
var RecordTypeId='XXXXXXXXXXX';
var resultLayout = sforce.connection.describeLayout(ObjectName, new Array(RecordTypeId));//to fetch the page layout fields.
I’m using “SingleEmailMessage” api to sending an email but activity is not logging when we set “setSaveAsActivity” attribute true. It is throwing an exception i.e. “System.EmailException: SendEmail failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Priority]: [Priority]”. Same piece of code working all the other classes but throwing an exception for a specific class. I’m using below code.

Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();
mail.setSenderDisplayName('SalesforceLogin Test');
mail.setSubject('Subject Test1234');
mail.setSaveAsActivity(true); //add mail to the activity history
mail.setHtmlBody('Hi! Salesforce user');
Messaging.sendEmail(new Messaging.SingleEmailMessage[] { mail });