• sri divvya
  • NEWBIE
  • 0 Points
  • Member since 2020

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies
Hi, I'm a relatively new Salesforce admin (~ 1 yr) and this past weekend set up my first apex trigger that batch creates and emails them using the SDocs app. 

It works perfectly in my sandbox and I'm excited to use it in production however I'm struggling to set up and run the required test class before I deploy it. I've looked up Salesforce documentation related to creating Test Classes but haven't had any luck. Would anyone be able to help me create a test class for this apex trigger? I'd really appreciate it! Thanks in advance..

Here's the code for my apex trigger:
 
trigger SDocsSendForumReminder on Program_Application__c (before update) { 
for (Program_Application__c l : Trigger.new) 
if (l.SDocs_Send_Forum_Reminder__c){ 
SDOC.SDBatch.CreateSDoc(UserInfo.getSessionId(),'id='+l.id+'&Object=Program_Application__c&doclist=a1d170000000G1B&oneclick=1&sendEmail=1');
l.Sdocs_Forum_Reminder_Send_Time__c= datetime.now(); 
l.SDocs_Send_Forum_Reminder__c=false; 
}}