Loading
Visual Studio Code Based Modeler for Consumer Goods Cloud
Table of Contents
Select Filters

          No results
          No results
          Here are some search tips

          Check the spelling of your keywords.
          Use more general search terms.
          Select fewer filters to broaden your search.

          Search all of Salesforce Help
          Automate Adding of Methods

          Automate Adding of Methods

          The framework calls some methods automatically when the state of BusinessObjects changes.

          Required Editions

          These methods are automatically created during the creation of a BusinessObject, a ListObject, or a Lookup when you run the sf modeler workspace add command.

          • CreateAsync: Creates an instance of a given business object. 
          • LoadAsync: Loads the simple properties of an object from the database.
          • ValidateAsync: Validates the consistency of an object before it is saved.
          • SaveAsync: Saves an instance or a list of a given object type that’s declared within a process.
          • Initialize: Initializes the attributes of a given object. 

          These methods are stubs, you can reprogram the methods as needed.

          Available in: Enterprise, Performance, and Unlimited Editions
          Contract Automatically created methods
          Business Object
          • afterCreateAsync
          • beforeCreateAsync
          • afterDoValidateAsync
          • beforeDoValidateAsync
          • afterInitialize
          • beforeInitialize
          • afterLoadAsync
          • beforeLoadAsync
          • afterSaveAsync
          • beforeSaveAsync
          List Object
          • afterDoValidateAsync
          • beforeDoValidateAsync
          • afterLoadAsync
          • beforeLoadAsync
          • afterSaveAsync
          • beforeSaveAsync
          Lookup Object
          • afterLoadAsync
          • beforeLoadAsync
           
          Loading
          Salesforce Help | Article