You need to sign in to do that
Don't have an account?
Girbson Bijou
Create Child report automatically
Where do you thank the problem is. the trigger is save but does not fire. The idee is to create a child record on a self relationship when outputType is House. Help me please
trigger AutoOutput on Output__c (after insert, after update) { List<Output__c> Output = new List<Output__c>(); for (Output__c NewOut : Trigger.New) { if ( NewOut.OutputType__c =='House') { Output__c OutputChild = new Output__c(); OutputChild.Housing_If_Sanitation__c= NewOut.Id; OutputChild.Project_Type__c = 'Sanitition'; OutputChild.RecordTypeId='Infrastructure'; OutputChild.Description__c='Discrption'; OutputChild.Locality__c='ghjggh'; Output.add(OutputChild); } } upsert Output; }
If name field is not Auto number please set the name also
Many developers face this issue because of a recursive trigger. For example, in an 'after update' trigger, a developer could be performing an update operation and this would lead to a recursive call, and the error:
"maximum trigger depth exceeded"
Refer this link
https://help.salesforce.com/articleView?id=000133752&type=1
Create Apex Class as shown below
Change apex trigger as shown below
https://suvi.com.au/blogs/news/easy-to-prepare-sous-vide-chicken-breast-recipe-suvi-cooking