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
r3rr3r 

md5 parent id

Hi All,

 

If any user have to close stage first he had to upload a document a created a visual force page to upload doc and it stores in notes and atachment and also generate MD5 code in opportunity.up to yet its ok now if the attachment is deleted md5 have to delete and stage should be previous value i have to write trigger in attachment, how to fetch parent id??

prakash_sfdcprakash_sfdc
trigger testTrigger on Attachment{
for(Attachment a:Trigger.new)
{
Id pid=[SELECT ParentId FROM Attachment WHERE Id=:a.Id];
}
}