Nested Mail Merge in custom entities

I have a requirement for a customer where I had to build a new quoting entity for them as they have a few elements that don't fit with the standard, also the connector was installed on this system and that seems to have locked the standard entities away with no hope of return. The two entities do just what I want them to do in the system, however I am struggling with the mail merge function.

There are two entities that are related in a similar way to the quotes in that I have a summary table and a table that contains the line. The issue I am having is that I can not seem to get the items to nest into a table in the same way that the quotes and orders do when doing a mail merge with them on the standard system.

I'm sure I read an article on here about this being possible however I can no longer find it and I think it may have been in another version. This system is currently on 7.3 sp3.

I've tried copying a standard quote document and changing the tags to the tags on my table however I think the instruction that states that the quotingitems table is child to the quoting table is missing and I am unsure where this could be added.

I have found a view that seems to map entities together however I'm not sure if this is used in mail merge and if inserting data directly into these tables would be a good idea when I don't know how they work.

vMappingsNestedChildEntities - made up of the GCRM tables.

The only other idea was to use the existing vMailMergeQuotes and vMailMergeChildrenQuotes and amend all the fields to be from my new entities. However this was not met with much success.


Any help with this would be much appreciated.

  • 0

    SOLVED!

    After SQL profiling a standard orders mail merge I was alerted to the MailMergeRelatedInfo table. So I added a new line into this table using my details in the mmri_EntityName, mmri_ChildEntity, mmri_ChildView, mmri_LinkColumn columns.

    After a metadata refresh and slight rejig of my mail merge doc, this worked a treat.

    FYI, you need to put and for both your child and your parent records. Much the same as the orders and the quote entity mail merges.

  • 0

    Brad, this is good stuff, however am not sure if this is a supported mechanism from Sage Support.

  • 0

    Though not supported, I like this - it's simple. Just did it myself with my custom entity 'Project' and showing all Opportunities linked to it.

    Maybe we should ask for Sage to review it see if it could be a proper solution (nice little screen within the Admin area? 'Parent Entity','Child Entity', 'View', 'Link Field')

    .....Just been playing with it, note that you're limited to one Child set of data per entity. I've just tried to also do it with Communications linked to Project. When merging it looks at the first row in the SQL Table with the Primary Entity name and uses that information (which for me is the original opportunity one I created).

  • 0

    I just did this with a custom secondary entity on the Cases entity. Works like a charm - thanks.