1.25 | 2/21/2023
Post-Installation, Document Generation, Related Data, Access, Roll-Ups, Formulas
Access Data Outside the Object’s Scope
Sometimes you don’t want to use relationships to tell Mambo Merge how to extract data outside the current object’s scope. Use built-in Salesforce functionality to access it instead.
Mambo Merge automatically works with all the fields on the record from which you initiate the merge. It also includes some related information like when a case was created. But sometimes, you may need more information from a related record. You can create Roll Up summary fields in Salesforce to make more data from related records available to Mambo Merge.
Let’s say you create a custom field on Cases, named “Most_Recent_Case_date_ _c” and you want to use that field to calculate the most recent case date when performing a merge.
You can create a new Roll Up summary field on Cases that will calculate the date and then add it to your template.
Start by defining a roll-up summary field
Create a custom field on the object where you want the field displayed. Summary fields summarize the values from records on a related object, so the object on which you create the field should be on the master side of a master-detail relationship. For instructions on creating a custom field, see Create Custom Fields.
Choose the Roll-Up Summary field type, and click Next.
Enter a field label and any other attributes. Click Next.
Select the object on the detail side of a master-detail relationship. This object contains the records you want to summarize.
Select the type of summary
TYPE DESCRIPTION COUNT Totals the number of related records.
SUM Totals the values in the field you select in the Field to Aggregate option. Only number, currency, and percent fields are available.
MIN Displays the lowest value of the field you select in the Field to Aggregate option for all directly related records. Only number, currency, percent, date, and date/time fields are available.
MAX Displays the highest value of the field you select in the Field to Aggregate option for all directly related records. Only number, currency, percent, date, and date/time fields are available.
Enter your filter criteria if you want a selected group of records in your summary calculation.
If your organization uses multiple languages, enter filter values in your organization’s default language. When you use picklists to specify filter criteria, the selected values are stored in the organization’s default language. If you edit or clone existing filter criteria, first set the Default Language on the Company Information page to the same language that was used to set the original filter criteria. Otherwise, the filter criteria may not be evaluated as expected. Click Next when you have set your filter criteria.
Set the field-level security
Determine whether the field should be visible for specific profiles, and click Next.
Choose the page layouts that should display the field.
The field is added as the last field in the first two-column section on the page layout. For user custom fields, the field is automatically added to the bottom of the user detail page.
Click Save to finish or Save & New to create more custom fields.
Mambo Merge works with all the fields on the record from which you initiate the merge. It may also include related information like Owner.FirstName and Owner.LastName. But sometimes, you may need more information from a related record. Using formulas is another method to extract this data for your merged documents.
Let’s say you create a custom field on Accounts, named Credit_Score__c and you want to use that field when performing a merge from Contacts. You can create a new formula field on Contacts that is populated with the value from the Account and then add it to your template.
From your org’s homepage head over to the Gear icon and select Setup from the dropdown list.
Click the Object Manager tab.
Search for the Contact within the Object Manager search bar and click on its search result.
Within Contact, select Fields and Relationships. Click the New button to begin the process to build out the formula field.
Choose the field type Formula and click on Next.
Choose the output type by providing a Field Name of Credit Score and choosing Text for the Formula Return Type. Continue by clicking Next.
Note: Field Name will automatically populate once Field Label is entered.
Select Advanced Formula and click Insert Field. Map the Credit Score field from the Account record by going to Contact > Account > Credit Score and clicking on Insert.
Note: You are using a formula field to map another field from one object to another.
Once the formula is defined and the field is mapped click Next.
Define the Field-Level Security by checking off which users will have access to this field.
Lastly, choose the Page Layouts that will be allowed to include this new formula field and click Save.
MAXIMIZE EXISTING RESOURCES
Now you can use Mambo Merge to access the Credit Score field from the Account record within the Contact record. These simple workarounds help Admins and Developers do moar! within their org.