• About
  • Contact me!

Salesforce Everywhere

~ Blog on Salesforce Dev and admin stuff

Salesforce Everywhere

Tag Archives: Salesforce Tips

Using Dynamic Actions

11 Wednesday Aug 2021

Posted by Mani in Salesforce Configuration

≈ Leave a comment

Tags

Dynamic Actions, Salesforce Tips, Winter 21

Scenario:

Let’s say we have a quick action button(Edit) in the Highlights panel and the object behind the page is a Custom object. Also, we have a field called Form Status and we need to hide the button, when the Form Status = Pending Department Approval or Form Status = Pending Final Approval. This means, when the record is pending for approval, we don’t want any user to edit it.

Solution:

Use Dynamic actions :). This feature lets us to show or hide the actions based on criteria(s).

Dynamic actions for custom objects are now GA for mobile, and have been GA for desktop since Winter ‘21. Dynamic actions for Account, Case, Contact, Lead, and Opportunity are now GA for desktop. Dynamic actions for all other standard objects are Beta for desktop.

Where: This change applies to Lightning Experience desktop and the Salesforce mobile app in Group, Essentials, Professional, Enterprise, Performance, Unlimited, and Developer editions.

How: To enable dynamic actions for a custom object on desktop and mobile, add or select the Highlights Panel component on the object’s record page. In the Highlights Panel properties pane, click Upgrade Now and step through the migration assistant to migrate actions or start with new ones.

Upgrade Now button for custom objects.

When you click on Upgrade now, system will ask you to migrate the existing page or start from Scratch. I had selected the Migrate option and chosen the page layout that is displayed on the record page. That’s it, now you can use Dynamic actions!!

Select the action(in this case, it is Edit) and click on Add Filter for that action. You can have multiple filters and set the filter logic as well:

The beauty of this feature is that we can also make this button available only for System administrators by checking the logged in user profile, when the Form Status = Pending Department Approval or Form Status = Pending Final Approval:

Actually, when you select Advanced, we can choose fields from User object, Device Form Factor, Custom/Standard Permissions and much more. Really cool isn’t it?

Hope this post is helpful and please leave your comments below for any questions. Thanks!!

P.S: To stay up to date on the road map for Dynamic Actions please join the Trailblazer Group here.

Tip#19 – Using workbench to execute APEX

10 Wednesday Feb 2016

Posted by Mani in Apex, Uncategorized

≈ 2 Comments

Tags

Salesforce Tips

Today, I was working on a requirement which queries public group and sends an email to the users(group members) with an attachment from the custom object record and it was implemented using APEX code. I wanted to test using Execute Anonymous option in Developer Console before I call the code using process builder. When I tried executing it in Developer Console, it was throwing Sending Request – Execution Failed error. I could not figure out the reason for it, but I realised that using workbench to execute Anonymous APEX code is better than Dev Console since your code, results are displayed in the same page and you can set the log level too.

Steps to execute APEX in Workbench:

a. Login to https://workbench.developerforce.com
b. Select Sandbox or Production(obviously, we will test the code in Sandbox first)
c. Then system will ask you to login to Salesforce
d. Once logged in, select “Apex Execute” in Jump to option
e. Paste your code in the text box and click on Execute button.
f. System will show the results on the same page. You can select the appropriate Log category and Log level too.

In the future post, I will write about creating a flow to query the public group based on the name and send an email to the group members(role based members).

Tip#18 Get Salesforce instance in Apex

09 Tuesday Feb 2016

Posted by Mani in Apex, Uncategorized

≈ Leave a comment

Tags

Salesforce Tips

Recently, I worked on a requirement where in I had to send an email by using APEX and I had to prepare the HTML body within APEX itself. As part of it, there has to be a clickable link in the email which should take the user to the Salesforce record after clicking on it and we should not hardcode the URL in the code.

So, here is the code below to get the logged in user’s URL and concatenate it with the Salesforce record ID:

String u=System.Url.getSalesforceBaseURL().toExternalForm();//this returns the base URL of the Salesforce instance as String.
String ufinal=u+’/’+POId;//POId is the variable that holds Id of the custom object record.

or you can write the above code in one line:

String ufinal = URL.getSalesforceBaseUrl().toExternalForm() + ‘/’ + POId;

Tip#13: Process Builder bulkified!

09 Friday Oct 2015

Posted by Mani in Salesforce Tips

≈ Leave a comment

Tags

Bulkify process builder, Process builder bulkification, Salesforce Tips

I developed a process recently in Accounts object and when I did a mass update of account records(around 600+ records), I got an error saying Too many SOQL queries: 101. This is due to the reason that process builder is not bulkified. Good news is that from winter 16 release onwards, the chances of getting this error would be reduced as Salesforce made process builder to handle bulkification.

Release notes link: http://releasenotes.docs.salesforce.com/en-us/winter16/release-notes/rn_forcecom_process_bulkification.htm#rn_forcecom_process_pb_bulkification.xml

Salesforce Tips: Tip#1 – Notes and Attachments permissions

25 Tuesday Aug 2015

Posted by Mani in Salesforce Tips

≈ Leave a comment

Tags

Salesforce Tips

Welcome to Salesforce Tips! Everyday at work, we always get opportunity to learn new things in Salesforce and I thought if we can share it in few words(perhaps less than 250 words) as Salesforce Tips, it would be useful for the Salesforce community.

Here is the first tip:

Notes and Attachments permissions are determined based on the parent object.Specifically, user need to have Edit permissions on the parent object and read/write visibility to the parent record. In addition, “Notes and Attachments” related list should be visible on the page layout.

Happy sharing and look forward for more Salesforce Tips!

Blog Stats

  • 111,809 hits

Archives

Recent Posts: Salesforce Everywhere

How to get field values on onLoad in lightning-record-edit-form in LWC?

Using Dynamic Actions

How to check if the logged in user is a Guest user or not in APEX class?

How to Close Quick action in LWC

Lightning component to filter Products and display results in lightning data table

Connect with me

  • View @manibalan_s’s profile on Twitter
  • LinkedIn

Developer links

  • Salesforce Developer website
  • Salesforce Success Community

Enter your email address and click on Follow us (below) to follow this blog and receive notifications of new posts by email.

Website Powered by WordPress.com.

  • Follow Following
    • Salesforce Everywhere
    • Already have a WordPress.com account? Log in now.
    • Salesforce Everywhere
    • Customize
    • Follow Following
    • Sign up
    • Log in
    • Report this content
    • View site in Reader
    • Manage subscriptions
    • Collapse this bar