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
          Standard Macros

          Standard Macros

          Macros are shortcuts used in SQL statements that are replaced at run time.

          Required Editions

          Available in: Enterprise, Performance, and Unlimited Editions

          Standard macros represent a constant value. They act as placeholders that are replaced with the real value during runtime. You can use these macros to define initial values in views and conditions of datasource contracts. Depending on the contract format and the section that you use the macro from, implement a special method.

          Standard macros can be of two types, depending on how their values are populated:

          • Macros that depend on information from the session of the current user
          • Macros that depend on the values set in the code or database

          Standard macros are case-insensitive.

          The table lists the standard macros and their corresponding replacement values.

          Macro Replacement Default Value or Format
          #Language# Fetches the language of the current user. For example, en and de. en
          #SalesOrg# Retrieves the sales organization of the current user. 0001
          #Client# Fetches the client configured for the current user. 010
          #UserPKey# Fetches the PKey of the current user. No default value. A valid user is required to use the app.
          #Today# Retrieves the current date in short ANSI format. YYYY-MM-DD
          #MaxDate# Fetches the system-wide maximum date value in short ANSI format 9999-12-31
          #MinDate# Fetches the system-wide minimum date value in short ANSI format. 1800-01-01
          #BusinessModified# Fetches the BusinessModified date of the object. Used in tables that have a businessModified column to mark the latest change in short ANSI date and time format. YYYY-MM-DD HH:MM:SS

          Sample code:

            <QueryCondition><![CDATA[
              Account_Sales_Data__c.Account__c = #bpaMainPKey#
              AND (Account_Sales_Data__c.Year__c = #year#
              OR Account_Sales_Data__c.Year__c = #year# - 1)
              ]]>
            </QueryCondition>
          
           
          Loading
          Salesforce Help | Article