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
Preetham 345 SFDCPreetham 345 SFDC 

Uploade more than one attachments for more than 100 Opportunitites at a time using apex

Hi All, 
Can we load more than 3 same attachments for 100 Opportunities at a time using apex , if possible can any one provide a sample apex code for this requirement , the main issue in which i am facing is with  parent Id since it is a mandatory field to insert an attachment , without inserting an attachment how would i relate it to that parent id or if i go in vice versa  after inserting the 100 Opportunities how should  i related the  3 attacments attachments to those 100 opportunities so when insertion of those  attachments  shouldnt create duplicates on attchement objects.

Preetham 345 SFDC