function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
bingi crm 7bingi crm 7 

I am try to Case when create a record automatically create note and attachment also document on trigger code.

Hargobind_SinghHargobind_Singh
Hi, can you please elaborate on your problem a bit ? Are you trying to create a case when a record is created and also create a note and attachment on the case?
 
bingi crm 7bingi crm 7
this is my attachment trigger but its not reflect the case where i am mistake just my error pls trigger autocreateattachment on Case (after insert) { list atta = new list(); for(case ats:trigger.new){ string pdfcontent = 'attachment'; Attachment attach=new Attachment(); attach.Name=ats +'.pdf'; attach.Body=blob.toPdf(pdfcontent); attach.ParentId '5002800000JvUFG'; attach.add(atta); } if(atta.size()>0) insert atta; }
bingi crm 7bingi crm 7
Method does not exist or incorrect signature: [Attachment].add(List<Attachment>)