+ Start a Discussion
QLearnQLearn 

How to Delete an attachment on Approval Rejection.

I am new to the Programming. 

 

I have a requirement where an attachement need to be Deleted on Approval Rejection.

 

Process of Record Creation: Record Created through mail, with an Attachment in Department object .

It is pushed to an approval before Publishing in Chatter post.

Now Record is Pushed to Master Approver Object. (Group of user have Access to it)

 

Now if Record is Approved  attachement should get stored in Storage custom object. and content should be posted on chatter.

 

If record is Rejected Attachment should get deleted, but still the record should Exsist. but no one should be able to edit it (except Admin Profile)

 

Please Help me in Accomplishing this Task. Thanks in Advance.

 

 

 

 

 

JitendraJitendra

Hi,

You can write trigger on Object to delet the Attachment. However how you are going to identify which attachment should be deleted. You should consider this case also that the object may have other required attachments also.