6.0 Vesper release and newer
To add a dashboard to Quote detail page, follow these steps:
Create Quote Type JSON configuration:
Code Block | ||
---|---|---|
| ||
{ "default": { "name": "default", "translationKey"tabs": "common_default",[ { "icon": "quote", "tabsname": { "header":, { "name"type": "header", "translationKey": "sfdc_quotes_tabs_header", }, { "typename": "quoteHeader" }items", "items": { "name""type": "items", "translationKey": "sfdc_quotes_tabs_items", }, { "typeicon": "quoteItemsclipboard-notes", "name": "notes", }, "type": "notes", "attachmentstranslationKey": {"dynamicTab_notes" }, { "nameicon": "attachmentsfile-check-alt", "translationKeyname": "sfdc_quotes_tabs_attachmentsactions", "type": "quoteAttachmentsactions", "translationKey": "dynamicTab_actions" }, { "workflowicon": { "folder-open", "name": "workflowdocuments", "translationKey"type": "sfdc_quotes_tabs_workflowdocuments", "typetranslationKey": "workflowdynamicTab_documents" }, { "workflow-historyname": {"attachments", "name"type": "workflow-historyattachments", "translationKey": "sfdc_quotes_tabs_workflowHistoryattachments", }, { "typename": "workflowHistorymessages", }"type": "messages", "messages": {"translationKey": "sfdc_entity_tabs_messages" }, { "name": "messagesworkflow", "type": "workflow", "translationKey": "sfdc_entityquotes_tabs_messagesworkflow", }, { "typename": "messagesworkflow-history", }"type": "workflowHistory", "dashboard"translationKey": {"sfdc_quotes_tabs_workflowHistory" }, { "name": "dashboard", "translationKey": "Insights", "type": "reactDashboard", "typeReference": "DP_CustomerInsights_CustomerDetailView", //dashboard name "parameterMapping": { "Customer": "customerId" } } } ] } |
Follow this example of parameterMapping:
Code Block |
---|
} } } |
...
Code Block |
---|
"dashboard2": {
"name": "Sales History",
"translationKey": "Sales History",
"type": "dashboard",
"typeReference": "Revenue_Margin",
"parameterMapping": {
"Customer(s)": "customerId"
}
} |
where:
"Customer(s)" | : | "customerId” |
Input name from dashboard | : | Column Name from Quotes list |
Dashboard This is the dashboard Groovy logic to take a mapped parameter:
Code Block | ||
---|---|---|
| ||
def customer def dp = api.currentItem() def customerId= dp?.customerId //deal plan case if (customerId){ customer = customerId }else if(api?.input('customerId')){ customer = api.input('customerId') }else if(api?.input('Customer')){ customer = api.input('Customer') }else if(api?.getElement('customerId')){ customer = api.getElement("customerId") } else { customer = api.getElement("Customer") } |
...