Pages

Sunday, August 28, 2022

Salesforce: Dynamic Forms (2)

After 18 months from my first dynamic form blog, we finally see a few standard objects covered by the dynamic form. As per the Winter '23 roadmap, we can enable Account (incl. person Account), Contact, and Opportunity with dynamic form.


Overall, the dynamic form functionality is still the same as per the initial release, where we can show/hide each field based on Record Field or Advanced, field with filters defined will have the eye orange icon next to it.



Record Field
  1. Field: another field in the same object
  2. Operator: depends on the selected Field (1) type, e.g. Contains, Equal, Not Equal
  3. Value: also depends on the selected Field (1) type
Advanced
  1. User, which is user info/detail
  2. Permissions, if the user has specific permission 
  3. Record, this can be a value from a related field, such as Created By Profile Name
Tips
you can't select more than 1 value in each filter, but you can add the same field in filters, then use "any filters are true" or filter logic.

Samples of use cases to use the dynamic form

  1. To hide/show fields from a specific profile in the layout, even the profile has visibility on the field-level security
  2. To hide/show fields from users without permission, such as View and Edit Converted Leads
  3. To hide/show field when the user selects a value, such as, when user Type = Customer, show Customer No, otherwise, hide Customer No field

But, do we still need the classic page layout when using the dynamic form? 

1. Record buttons are still determined by page layout, you can handle this by enabling dynamic action, check out here.

2. Related lists are also determined by page layout, you can handle this by removing the "Related Lists" component and adding the Related List - Single component for each related object. However, if you use the "Related List Quick Links" component (which is a great feature since Classic), adding "Related List - Single" will not add the object to "Related List Quick Links", so come and vote for this idea




Wednesday, August 17, 2022

CRM Analytics: Trend dataset with Dataflow or Recipe

Background: The dataset produced is only for the last 30 days of data, but we need to keep the data for much longer.

Solution: use dataflow/recipe to store the trend in a new dataset

1. Download the dataset in a CSV file and load it as a "trend" dataset

2. Use dataflow/recipe to read from the original and trend dataset

3. Append both datasets

4. Use computeRelative node (dataflow) or "Multiple row formula" transformation (recipe), Partition By the key field, this is to mark the 1st record

5. Filter out rows not marked as 1st record

6. Done


Recipe


Multiple row formula




Page-level ad