I'm new to DocGen, and I think it has the potential to be extremely useful throughout my organization, but I'm having trouble figuring out how to set up a Word template in such a way that I can pull information from multiple objects of the same type.
Let's say I have an object called "Client Contact," and within that object are entries for Jane Doe and John Smith, both of whom work for Employers Inc. Within the entries for Ms. Doe and Mr. Smith are a number of fields (e.g., name, DOB, date they joined Employers Inc., mobile phone, home phone, email address, etc.). (I should note here that my use case does not involve clients or their personal information, but the principles are the same.) I'd like to include in my Word template selected pieces of this personal info for each client contact, and I'd also like to include their names at several points throughout the generated document. However, the way I've been setting up my DocGen packages, the field tags generated in Salesforce are always the same for both Ms. Doe and Mr. Smith: <<Client_Contact_Name>>
Is there a way to pull this information from two of the same objects into one document without coding custom relationships or creating separate components (which would be difficult to implement, based on how our documents are organized)? What if I complicate things by adding multiple entries from different custom objects (e.g., eight entries from Site Visits and three from Networking Opportunities)?
Based on the description of your situation, we believe you are looking to pull in data from different lookup fields to different records possible on the same objects.
To get the correct tags for each lookup, please create 1 lookup relationship to the desired object.
This will then allow the Field Tagger Path taken in the documentation below to get the correct tags for each Lookup Field. This will then allow your tags for each lookup to be unique for the document.
Let us know if this resolves your issue or if you have any additional inquiries!