Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
trigger asadsd on Account (before update) { List<Account> accList = new List <Account>(); for (Account aa : Trigger.new) { accList.add(new Account(Name =aa.Name)); } insert accList; }
trigger asadsd on Account (before update) { List<Account> accList = trigger.new.deepClone(); insert accList; }
@isTest public class MyAccountcreationTest { static testMethod void testMethod1() { Account testAccount = new Account(); testAccount.Name='Test Account' ; insert testAccount; Test.StartTest(); testAccount.Name='Test Account Update' ; update testAccount; Test.StopTest(); } }
public class P { public static boolean firstRun = true; }
trigger asadsd on Account (after insert) { if(P.firstRun){ List<Account> accList = trigger.new.deepClone(); insert accList; p.firstRun = false ; } }
I am getting this Error. What can be the reason
https://developer.salesforce.com/docs/atlas.en-us.apexcode.meta/apexcode/apex_classes_static.htm