Loading
Intermittent Errors with Salesforce Trial Org Registration Read More
Business Rules Engine
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
          Tips to Work with Subexpressions

          Tips to Work with Subexpressions

          You can’t modify a subexpression version when it’s active. You can reuse an active subexpression without creating a subexpression from scratch. You can map the subexpression’s input and output variables to the local resources of the expression set version that the subexpression is used in. You can directly replace or delete subexpressions added in expression set versions, without deleting mapped variables or subsequent steps that reference the subexpression’s variables.

          Required Editions

          Available in: Lightning Experience
          Available in: Enterprise, Unlimited, and Developer Editions for clouds that have Business Rules Engine enabled
          Scenario Tips

          A subexpression version with the highest rank is used as a step in an expression set version. You want to update the steps in the subexpression version without changing the input and output variables.

          For example, the subexpression version has 10 input and output variables. Without changing any variable, you want to update the calculation formulas or the conditions that the variables are used in.

          • Save the subexpression version as a new version.
          • Update the step elements and save the version.
          • Give the version the highest rank.
          • Activate the version.

          When the parent expression set version is run the next time, the updated subexpression version that has the highest rank is considered.

          A subexpression version with the highest rank is used as a step in an expression set version. You want to use some steps and variables in the subexpression version, but you also want to make other changes that require you to add or remove variables.
          • Deactivate the version of the parent expression set that references the subexpression.
          • Remove the subexpression from the parent expression set version.
          • Deactivate the subexpression version that you want to modify.
          • Modify the version.
          • Verify that the version has the highest rank.
          • Activate the version.
          • Add the subexpression back to the parent expression set version, and activate the version.

          When the parent expression set version is run the next time, the version considers the updated subexpression version.

          When a subexpression version is added in an expression set version step, variables are automatically created in the expression set version corresponding to the subexpression’s variables. You now want to map the subexpression’s variables to different local resources in the expression set version.
          • Click the Map Variables button on the subexpression step of the expression set version. The subexpression’s input and output variables are listed.
          • Choose the expression set version’s local resource that you want to map your subexpression’s variables to.
          • After you map the subexpression’s variables explicitly, the corresponding variables that were automatically created in the expression set version are now deleted.
          A subexpression is used in an active expression set version and its output variables are used in subsequent calculation steps of the expression set version. You now want to delete the subexpression from the expression set version.
          • Delete the subexpression step in the expression set version.
          • The subexpression is deleted without explicitly deleting the subsequent expression set version steps that reference the subexpression’s variables.
          • Variables that were automatically created in the expression set version corresponding to the deleted subexpression’s variables are now deleted.
          • Fix any errors shown in the subsequent expression set version steps that reference the deleted subexpression’s variables.
          A subexpression is used in an active expression set version and its output variables are used in subsequent calculation steps. You now want to substitute the subexpression in the expression set version with another one that better suits your business needs.
          • In the subexpression step in the expression set version, click X to remove the subexpression.
          • Select the new subexpression that you want to use.
          • The subexpression is changed without explicitly deleting the subsequent expression set version steps that reference the old subexpression’s variables.
          • Input variables of the new subexpression that match the old subexpression’s variables are retained.
          • Explicitly map the output variables of the new subexpression.
          • Fix the errors that are shown in subsequent expression set version steps that reference the old subexpression’s variables.
           
          Loading
          Salesforce Help | Article