Forum Replies Created

Page 2 of 2
  • Shubham

    Member
    July 17, 2017 at 12:00 pm in reply to: What is recursive trigger in salesforce

    Hi absar

    A recursive trigger is one that performs an action, such as an update or insert, which invokes itself owing to,  say something like an update it performs.

     

    eg in a before trigger, if you select some records and update them, the trigger will invoke itself.

     

    To avoid, static variable 'locks' are used. Illustrated in the salesforce doc

     

    "Static variables are only static within the scope of the request. They are not static across the server, or across the entire organization.

    Use static variables to store information that is shared within the confines of the class. All instances of the same class share a single copy of the static variables. For example, all triggers that are spawned by the same request can communicate with each other by viewing and updating static variables in a related class. A recursive trigger might use the value of a class variable to determine when to exit the recursion."

     

    http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_classes_static.htm

  • Shubham

    Member
    July 13, 2017 at 7:21 am in reply to: Difference between and ?

    Hi Saloni

    Lightning button

    A lightning:button component represents a button element that executes an action in a controller. Clicking the button triggers the client-side controller method set for on click. Buttons can be either a label only, label and icon, body only, or body and icon. Use lightning:button Icon if you need an icon-only button.

    UI button

    A ui:button component represents a button element that executes an action defined by a controller. Clicking the button triggers the client-side controller method set for the press event

Page 2 of 2