• RHibbs
  • NEWBIE
  • 0 Points
  • Member since 2017
  • Salesforce Systems Technician
  • Allianz Insurance PLC


  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 4
    Replies
Hi,

I want to give a standard user the possibility to change the "assign to" user of a task? Is it possible?

Thank you.
hi i have two objects student__c  and Library__c both are related ojects


trigger createLibrary on student__c (after insert,after delete) {
    
   if(Trigger.isInsert){
       studentTriggerHandler.onStudentInsert(Trigger.New);
   }
   if(Trigger.isDelete){
       studentTriggerHandler.onStudentDelete(Trigger.Old);
   }
   
 }
handler class:
public class studentTriggerHandler{

    public static void onStudentInsert(List<student__c> studRecs){
    
        List<Library__c> lib1=new List<Library__c>(); 
        for(student__c std : studRecs){
        
            Library__c lib=new Library__c();
            lib.name=std.name;
            lib.studentname__c=std.id;
            lib.Enrollment_date__c=std.date__c;
            lib1.add(lib);
        }
        
        if(lib1.size() > 0){
            try{
                insert lib1;
            }catch(Exception ex){
                System.debug('Exeption'+ex);
            } 
          }
        }
    
    public static void onStudentDelete(List<student__c> oldStudRecs){
        
        list<id> stdlist=new list<id>();
        for(student__c  str : oldStudRecs){
            stdlist.add(str.id);
        }
        list<Library__c > liblist=[select id from Library__c where studentname__c in :stdlist];
        delete liblist;
    }

}
Hi, I am new to Apex coding and hope someone can help me. I need to auto submit approval for accounts if they are certain record type (01224000000Cs5a) and when Manually_passed__pc is changed to TRUE value.

Much appreciated.

Inna