1) Total Amount field on Account . Write a trigger to sum all the amount field of Contact to Total Amount field on Account
2)
1) Total Amount field on Account . Write a trigger to sum all the amount field of Contact to Total Amount field on Account
2)
By default APEX runs in system mode - without sharing mode
with sharing :
without sharing:
inherited sharing: forced sharing / This allows the class to run in the same mode as the class which called it. Apex classes with Inherited Sharing that are called from other classes with no sharing settings will run in no sharing mode.
1) method defined class sharing setting is applied ,not of called class
2) both inner or outer class can be defined as sharing/without
without sharing is calling the method of a class with inherited sharing, then it will run in without sharing mode.with sharing is calling the method of a class with inherited sharing, then it will run in with sharing mode.omitted sharing (i.e. no sharing is mentioned) is calling the method of a class with inherited sharing, then it will run in without sharing mode as the default sharing mode of the omitted sharing is to run in without sharing mode (This is because the calling class is established as a without sharing context). A class declared as inherited sharing runs as without sharing only when explicitly called from an already established without sharing context.with sharing is calling a method of a class with omitted sharing which in turn calls a method of a class with inherited sharing, then it will run in with sharing mode, as the calling class is in with sharing mode and omitted class is established as with sharing context.without sharing is calling a method of a class with omitted sharing which in turn calls a method of a class with inherited sharing, then it will run in without sharing mode, as the calling class is in without sharing mode and the omitted class is established as without sharing context.omitted sharing declaration runs as without sharing.inherited sharing ensures that the default is to run as with sharing.Heap Size - 1) Memory size for holding object , variables and records 2) CPU Time limit - 1) time consuming during whole transaction ...