Monday, 8 February 2021

Manual Sharing in Salesforce Lightning Experience

 In Spring 2021, Salesforce announced the SHARING Action Button for Lightning Experience. Previously it was available only for Classic Experience.

Step 1 - Go to the Object's Page Layout from the Lightning Experience.

Step 2 - Click on the "Mobile & Lightning Actions".

Step 3 - Search the "Sharing" Action Button and then drag & drop on the Page Layout.


Thanks for your visit to my Blog. If this post is helpful to you then share and follow to get new coming SFDC4Students blog posts.

SOQL to Get All fields | SOQL to Get Custom Fields with some Standard fields | SOQL to Get Standard Fields with some Custom fields

 In Spring 2021, Salesforce announced a new FIELDS() function in SOQL.

Examples of FIELDS() clause in SOQL

Query All Field at once

1
SELECT FIELDS(ALL) FROM Lead LIMIT 200

Query All STANDARD Standard Fields

1
SELECT FIELDS(STANDARD) FROM Lead

Query All CUSTOM Fields

1
SELECT FIELDS(CUSTOM) FROM Lead LIMIT 200

Mix Standard Fields and FIELDS(CUSTOM)

1
SELECT Email, FIELDS(CUSTOM) FROM Lead LIMIT 200

Mix Custom Fields and FIELDS(STANDARD)

1
SELECT Custom_Field__c, FIELDS(STANDARD) FROM Lead

Thanks for your visit to my Blog. If this post is helpful to you then share and follow to get a new coming SFDC4Students blog posts.

Thursday, 28 January 2021

Pass Record Id from Visualforce to Aura Lightning Component

This is the Visualforce Code for Pass the Record Id from the Visualforce page to Aura Component.

Let's Say we need to get and pass the Record Id from the below URL using only the Visualforce page to the Lightning Component.

https://dev-sfdc4students.cs74.force.com/?Id=a0A0p000001Z3F6

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<apex:page standardStylesheets="false" showHeader="false" >
    <!-- Include a JavaScript file in your Visualforce page -->
    
    <apex:includeLightning />
    <div id="lightning" />
    <script>
    
    //"cmpCustomerFeedbackApp" is your Lighning Component App Name (This is mandatory to create App)
    $Lightning.use("c:cmpCustomerFeedbackApp", function() {
        // "c:cmpCustomerFeedback" is your Lightning Component Name 
        // which is using in your Lightning Component App
        $Lightning.createComponent("c:cmpCustomerFeedback",
                                   {
                                       //"recordId" - This is your component attribute & is your Object Id
                                       "recordId" : "{!$CurrentPage.parameters.Id}",
                                   },
                                   "lightning",
                                   function(component) {
                                       // do some stuff
                                       //alert("{!$CurrentPage.parameters.Id}");
                                   });
    });
    </script>
</apex:page>

Thanks for your visit to my Blog. If this post is helpful to you then share and follow to get new coming SFDC4Students blog posts.

Total Pageviews