We have a requirement to create a static group in Sage CRM based on an external email list. I have worked out how I will get the person and company ids that I need to create the group. I am having an issue determining what all needs to be populated for a static group.
Bases on my research, dynamic group data is stored in four metadata tables for reports. For a static group, group data is stored in the four report tables along with data in the Key Attributes tables. The Key Attributes tables are where I need some assistance.
However, I am having trouble finding an article explaining what needs to be populated in the Key Attributes table for a static group. Since the Key Attributes tables are also used to track Key Attributes data for Primary Entities, most of the articles that I have found on the Key Attributes table relate to that scenario.
I have found a couple of articles that show how to create a group using CRM.TargetLists. However, they appear to be for dynamic lists and appear to only populate the custom_report metadata tables as follows...
- custom_reports
- custom_reportsearches
- custom_reportbands
- custom_reportfields
I cannot find any articles that specify which tables to populate in the Key Attributes tables for a static group. If someone could point me to a good article, I would greatly appreciate it.
Without an article to follow, this is what I have been able to determine. These are the tables that need to be populated for a static group.
DDCategory, DData, DDField
DDCategory appears to be the header record and contains the Group Name. The id from the header record created here is then populated in the custom_reports table. This groups your static list to the group. There is a "ParentID" field on this record that I do not see what it is related to. The value appears to be 2. Can someone tell me what this ParentID is linked to?
DData appears to be the details that make up the list. Therefore it contains the entity and the entityrecord for each record that makes up the list.
DDField. This is the table that I don't understand. I can see that there are two records for each DDCategory.
For the first row, the field ddfld_basetype = ShortStr. For the second row, the field ddfld_basetype = HIDDEN
Can somone explain the purpose of these two rows?
There is also a field in this table that contains a "ParentID". DDFld_ParentID. Can someone tell me what this ParentID relates to? They all appear to be populated with 4. However, I don't know what that represents.
I am able to create the information in the metadata tables using CRM.TargetLists and the assistance of a couple of articles. I believe I can work out the scripts to create the records in the Key Attributes table if I can understand my questions to some of the pieces above.
Any assistance would be greatly appreciated. These are the articles that I used...