You need to sign in to do that
Don't have an account?
Simran Suri
Create a new task and attachment through apex
Hi,
I have a requirement where I have a custom 'Email Quote' button on Quote object, which navigates to a new visualforce page where the related Quote, Case and Opportunity attachments are fetched and attached with the email template to be sent. After the email is sent, I have to save the sent email in the Quote's Activity History section and create a new task with some predefined values and the quote attachments should be attached in the Task's Attachment section automatically. I am able to create a task successfully, but, how do I add the quote attachments to the task Attachment section programmatically? Please help !
I have a requirement where I have a custom 'Email Quote' button on Quote object, which navigates to a new visualforce page where the related Quote, Case and Opportunity attachments are fetched and attached with the email template to be sent. After the email is sent, I have to save the sent email in the Quote's Activity History section and create a new task with some predefined values and the quote attachments should be attached in the Task's Attachment section automatically. I am able to create a task successfully, but, how do I add the quote attachments to the task Attachment section programmatically? Please help !
Create a trigger on Task object (After trigger) where you can query the Quote's attachment clone them and attach them to Task object.
Thanks