Pages

Monday, August 10, 2020

Einstein Analytics: Deploying Conditional Formatting

When you deploy the Einstein Analytics dashboards contain conditional formatting using ANT or Change Set or simply copy and paste the dashboard JSON, conditional formatting will not follow, you need to manually configure the conditional formatting again in the target environment manually.

This is because conditional formatting in the dashboard is stored under dashboard XMD, so if you deploy the dashboard XMD, then conditional formatting will be deployed.

In this blog, I will use Workbench to deploy this.

1. Create package.xml file

<?xml version="1.0" encoding="UTF-8"?>

<Package xmlns="http://soap.sforce.com/2006/04/metadata">

    <types>

        <members>Test_Conditional_Formatting</members>

        <name>WaveXmd</name>

    </types>

    <version>48.0</version>

</Package>

Test_Conditional_Formatting in above sample is the dashboard API name, you can check dashboard API name from Workbench too https://workbench.developerforce.com/restExplorer.php?url=/services/data/v48.0/wave/dashboards&autoExec=1


2. Retrieve dashboard XMD file

From workbench login to source org. > migration > retrieve, select package.xml prepared in step (1) >  click Next button > click Retrieve button > download zip file

3. Deploy Zip file

Make sure the dashboard has been created/deployed in the target org. From workbench login to target org. > migration > deploy > select zip file from step (2) > click Next button > click Deploy button 


Now open the dashboard in target org and the conditional formatting has been applied.




Sunday, August 9, 2020

Salesforce Lookup Filter

Lookup is a very simple feature in Salesforce, but also powerful, with just a few clicks you can relate an object to another object easily as a parent-child relationship.

However, in some business needs, the system should NOT look up ALL parent records, here is the scenario between Account (parent) and Case (child):

  • Case External --> Account Type = Customer
  • Case Internal --> Account Type = any

External and Internal is Case record type, and Type is the standard Account field. Of course, we can use validation rule to block Case creation for record type = External, but validation rule does not offer the best experience, as users will not easily know if an Account is a Customer or not.

Good that Salesforce offers Lookup Filter criteria and even better you can define the logic. For the above requirement, here my lookup filters. 

Make sure to enable the lookup filter.


Reference:











Page-level ad