Saturday, 19 December 2020

Lightning components: can helpers call other helpers

You can definitely call another function within the same object using the this keyword.  Below Example doesnt make sense but it demonstrates the functionality of code

Lightning component : 

<aura:component >

    <input type="button" onclick="{!c.buttonClicked}" value="Click Me" id="myButton" />

</aura:component>

Controller :

({

    buttonClicked : function(component, event, helper) {

        helper.callHelper(component, event.target.id);

    }

})

Helper:

 ({

    callHelper : function(component, buttonId) 

    {

        console.log('call1',buttonId);

     this.helper1(component, buttonId,'Test');  

    },

    helper1 : function(component, buttonId, newLabel)

    {

        console.log('call2',buttonId);

       console.log('call3',newLabel);

    }

})

Wednesday, 16 December 2020

 Permission to Write Apex Code

 They need the Author Apex permission. Ticking this box will result in them being assigned a lot of other permissions as well though.

Granting Author Apex permission also gives the user the following permissions:

  • Modify All Data
  • View Setup and Configuration

Granting Modify All Data also gives the user the following permissions:

Read, Create, Edit, Delete, View All, Modify All on all standard and custom objects

  • Edit Events
  • Edit Tasks
  • Manage Public List Views
  • Manage Public Templates
  • Run Reports
  • Transfer Record
  • View Setup and Configuration
  • Manage Public Documents
  • Import Leads
  • Transfer Leads
  • View All Data
  • Use Team Reassignment Wizards
  • Manage Categories
  • Convert Leads
  • Import Solutions
  • Create and Set Up Communities
  • Connect Organization to Environment Hub
  • Manage Reports in Public Folders
  • Manage Dashboards in Public Folders
  • Delete Topics
  • Assign Topics
  • Create Topics
  • Edit Topics