You need to sign in to do that
Don't have an account?

how to retrieve parent field from attachments
Hi,
how to retrieve parent object field from attachment query..
Thanks,
Lakshmi
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi,
how to retrieve parent object field from attachment query..
Thanks,
Lakshmi
Through parentId we can get the value ...
Through parentid. It is a polymorphic field. See the below link to which objects it is related.
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_objects_attachment.htm#topic-title
If this post is helpful please throw Kudos.If this post solves your problem kindly mark it as solution.
Thanks
Lets say your Attachment id is 'XXXXXXXXXXXXXXX' and you can fetch parent id like below
String ParentID ;
for(Attachment Atc : [select ParentId from Attachment where id = 'XXXXXXXXXXXXXXX' ])
{
ParentID = Atc.ParentID ;
}
system.debug('========ParentID ========'+ParentID );
Hi,
Thanks for replys. Actaully attachment able to store all object attachements right? but i need to display only one custom object attachments and i have in that parent custom object one date field is available. i need to display date field of parent in vf page. Please let me know the way.
Thanks,
Laskhmi
Hi,
Refer this link. I'm not able to understand your scenario.Can you explain this?
http://boards.developerforce.com/t5/Visualforce-Development/how-to-get-ParentID/m-p/652981#M67107
did you find the solution ? I have the same issue :(