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
sundar84sundar84 

Getting child records from Parent object Mail merge button

 

Hi Friends

 

Is possible to get the child object records from parent object by using mail merge Feature.?  I am creating one mail merge document it contains the Parent and child records merge fields. The Mail merge templete returns information when i click the mail merge from child object. but it didnt work when i run in parent object..

 

Please let me know your valuable suggestion...

 

 

 

Thanks

Sundar

 

communitycommunity

When you run in parent object, it cannot return information of the child object because there will be more than 1 child record and hence it doesn't know which record to pick from the child records.

 

Where as, if you run it in child object, the parent record will be only 1. So, it can get information.

sundar84sundar84

 

Thanks for ur comment. If Parent object have one child in this case also didnt return the child record value...  

 

Thanks

Sundar

CLKCLK
If you want to show all child record of pericular parent, then go for visualforce template which will on parent object. And after that use related list component for that perticular child record and your problem is solved. ex:
sundar84sundar84

Hi CLK

 

Thanks for your comments. you told build one visual force page then fetch the child records from the parent record.

Parent record Activity history related list  have mail merge button. If click the button  mail merge template only displayed.  I am asking how to achieve this in Mail merge template.  I hope you can understand what i am trying to say about the problem

 

 

Thanks

sundar

CLKCLK
Hi Sunder, I am not saying vf page, it's visualforce template, one of template type given by sfdc just like html template, but difference is that you can use visualforce component in it. you will get sample of it from developer forum. In that template you need you use apex:reltaedlist component for showing all record related to that record. And you will forwarding only parent object id to that mail merge button means merge field will be related to only that parent record. ex : vf template based on account object can show all contact record using that component. merge field {!account.contacts} in value of apex:relatedlist component.
sundar84sundar84

Yes i agree develop VF template with all needed related child merge fields in the template.  i am asking how to generate the template from the parent record.

 

Thanks

sundar

sundar84sundar84

Our Requirement is Generate a word document with  child records. Salesforce provided the standard feature like mail merge. so only i am asking is there any way to  get the child records from parent record by using  the mail merge feature?

 

Thanks

Sundar