• hims mose
  • NEWBIE
  • 0 Points
  • Member since 2021

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
I'm encountering an issue with a guest site user receiving this error: " Insert failed. First exception on row 0; first error: TEMPLATE_NOT_FOUND, The record couldn't be saved because it triggered an email alert that failed. Please contact salesforce.com Customer Support". I've narrowed down the issue to merge fields on an email template causing the problem. Seems the guest site user somehow doesn't have access to the records being used as merge fields. The sharing settings for these objects are set to "Public Read/Write" access. I also tried adding a "Guest user access, based on criteria" sharing rule granting access to all records based on criteria that would hold true for any record. ANy idea how I may be able to fix this issue?
in scheduled apex write a program any custom object every 1st saturday of the month
in Batch apex write program to update the name field in the contact object with the level as primary 
(Note : upload 500 records through dataloader)
Hello,
     I am trying to write an after insert trigger to change the OwnerId of a record in a custom object. But when I try and create a new record the following error occurs :
Apex trigger OwnerSwap caused an unexpected exception, contact your administrator: OwnerSwap: execution of AfterInsert caused by: System.FinalException: Record is read-only: Trigger.OwnerSwap: line 6, column 1

Following is the trigger I have written :
trigger OwnerSwap on Course__c (after insert) {
    for(Course__c c : Trigger.New)
        {
           if(c.OwnerId != null)
           {
               c.OwnerId = c.Health_Coach__c;
           }
        }
}

Thanks.
Hi
 
I have a requirement like reading a file on local mahine using Apex
after reading that file using Apex I want to send the contents of that file as an attachment through email
 
can any one send me the sample Apex code of reading a file on local machine
 
waitng for a quick reponse
 
regards
sunil