Pages

Monday, May 20, 2024

Salesforce: Target Object for Create a Record Action Type

We discussed in an earlier blog that we can use an action to "find" a child object; however, for a child object with multiple parent objects, the object may not be available for selection as a Target Object in “Create a Record” quick actions.

Salesforce does not allow to create the actions to related child entity when we have multiple relations of different types to the child entity. 

For Example:

Custom objects A-B with Master-Detail relationship and custom objects A-C with Master-Detail relationship too --> create quick action “Create a Record” on A, you will see both B and C as target objects.



Custom objects D-E with a Master-Detail relationship and custom objects F-E with a Lookup relationship, too --> create a quick action “Create a Record” on D; you will see E as the target object, but create a quick action “Create a Record” on F; you will NOT see E as the target object.


* blue line = Master-Detail and red line = Lookup relationship


Now, change the D-E objects relationship to Lookup, and you will see E as the target object from both D and F.



If you change both the D-E and F-E relationships to Master Detail, you will see E as the target object from both D and F too.






Reference

Friday, May 17, 2024

CRM Analytics: Recipe and Dataflow case sensitive

Key in join node in CRM Analytics is case-sensitive, sample:



The same applies to the augment node in the dataflow; the key is case-sensitive too, sample:
 

 

Thursday, May 2, 2024

Salesforce: Custom Object without Tab

It's easy to create a custom tab to create a new record of an object from UI; however, in some scenarios, we (admin) are not supposed to create a custom tab, so how to enter new data from the UI, or to see data created (I know we can use report if that object is enabled for reporting) in UI.

Create a New Record
https://domainname.lightning.force.com/lightning/o/objectname__c/new

View Record in the List View
https://domainname.lightning.force.com/lightning/o/objectname__c/list?filterName=Recent
Once you have landed in the list view, you can create a new list view with filters to see the data as needed.



Tuesday, April 23, 2024

CRM Analytics: Recipe syntax

Every computer language has its own syntax, the same with query language or formula. Here are the samples of SAQL that are used in Dataflow.

 Since CRM Analytics is moving with Recipe, here are samples of the formula syntax in the Recipe:

String - use '  ', e.g., 'Singapore'

Field name - use "  ", e.g., "Account.Id", optional if the field name does not contain dot(s)

Field with blank value - "Opportunity.Id" IS NULL

CASE, e.g., case when Have_Activity = 'Yes' or Have_Opportunity = 'Yes' then 'No' else 'Yes' end

IN with (), e.g.,
case when Type in ('Customer', 'Other') then 'A'
        when Type in ('Customer - Direct', 'Customer - Channel') then 'B'
        else 'C' 
end

Logical Function
use or, and, e.g., case when Have_Activity = 'Yes' or Have_Opportunity = 'Yes' then 'No' else 'Yes' end

Compare Operator
use != (not <>) as compare operator, also use = (not ==), e.g., Have_Activity != 'Yes'

Current and Previous Quarter
case 
    when quarter(now()) = 2 and (year(now()) = year(LastActivityDate)) then 'Yes' 
    when quarter(now()) = 3 and (year(now()) = year(LastActivityDate)) and (quarter(LastActivityDate) in (2,3)) then 'Yes' 
    when quarter(now()) = 4 and (year(now()) = year(LastActivityDate)) and (quarter(LastActivityDate) in (3,4)) then 'Yes' 
    when quarter(now()) = 1 and ((year(now()) = year(LastActivityDate)) or (quarter(LastActivityDate) = 4 and year(LastActivityDate) = year(now()) -1)) then 'Yes'
    else 'No'
end


Do you have a great formula to share? Feel free to add in the comment.




Friday, April 19, 2024

CRM Analytics: Adding Salesforce Action in CRM Analytics

Here is the step:

1. Create Salesforce Action --  navigate to Salesforce's object manager, look for the object, click on Buttons, Links, and Actions menu, then click New Action.

2. Add the newly created Action to a Salesforce page layout (this is a must).

3. Configure the Action from the CRM Analytics dataset. 



Once configured, if you have a table widget in the dashboard, you can also set up one-click actions, so by clicking the value, the action selected will be performed, e.g., click the value in Account Name to call the action to edit Industry.




Reference:

  



Thursday, April 18, 2024

Salesforce: Public Read/Write Access




What does Public Read/Write access mean for a user? This means all users can view and edit all records for that object, but only when the user has permission to access the object (minimum read access). The object permission can be set in Profile or Permission Set assigned to the user.

For example, if Tom is the owner of Trident Inc.'s record, all users can view and edit it. However, only Tom can change the owner or delete (if he has Delete permission given via Profile or Permission Set) the Trident Inc. record.


Scenario:

1. User Profile (and Permission Set) does not have access to the object

  • Unable to access any records
  • Unable to own records from the object 


2. User Profile (or Permission Set) has Read access to the object

  • Able to own records 
  • Able to access records owned by any users


3. User Profile (or Permission Set) has Edit access to the object

  • Able to own records 
  • Able to edit records owned by any users
  • Not able to change record owner, only record owner (and users above the role hierarchy if Grant Access Using Hierarchies is enabled for custom objects; Grant Access Using Hierarchies is always enabled for standard objects)


4. User Profile (or Permission Set) has Create access to the object

  • Read access will be auto-enabled
  • Able to create records 


5. User Profile (or Permission Set) has Delete access to the object

  • Read and Edit access will be auto-enabled
  • Able to delete records owned
  • Delete permission does not roll up to users above the role hierarchy; even the Grant Access Using Hierarchies is enabled 


So, in other words, View All permission is replaced with Read permission, while Edit All permission is replaced by Edit permission. 


Note: Profile permission access does not roll up to user by Role Hierarchy


Reference




Page-level ad