Loading
Feature degradation | Gmail Email delivery failureRead More
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
          Optional Binding Attributes

          Optional Binding Attributes

          Use optional attributes in macros to define the typical bindings for the repetitive variables in the each and correlation nodes.

          Required Editions

          Available in Lightning Experience in Enterprise and Unlimited Editions that have Consumer Goods Cloud enabled.

          Include these optional attributes as part of macros path to define the typical bindings for the repetitive variables in the each and correlation nodes:

          • Toggles
          • Number format
          • Date and time format

          Toggle

          The toggleId (domain id) and toggleField attributes define a macro path to toggle. The labels and the toggle values are bound to the locale of the user logged into the Consumer Goods offline mobile app. You cannot toggle an ImageId. For example, <td bold="true">{{Declarations::header.luDeliveryRecipient.countryState;toggleId=DomCountryState; toggleField=shortText}}</td>.

          Number Format

          The numberFormat attribute defines the format of a number in a macro path. This attribute is similar to the formatV2. For more information, refer formatV2 attribute. For example, <td alignment="right">{{.basePriceReceipt; numberFormat=8.2}}</td><td alignment="right">{{.grossValueReceipt; numberFormat=8.2}}</td>.

          Date and Time Format

          The dateTimeFormat attribute defines the format of date and time. By default, this attribute uses the formatting defined for the following keys, available in DateFormats in the Localizations section in the locale contract:

          • date
          • dateTime
          • time
          • shortDate

          These keys are case sensitive. The changes that you make in the DateFormats section affects the UI, not the underlying data, which retains the formatting of the default locale. This allows the date and time format in the PDF print documents to be shown based on the locale. If these special keys aren’t defined in the referenced locale contract, the print engine applies the internal fallback.

          This example describes how to refer to the localized date and time format defined in the locale contract with the dateTimeFormat attribute. In these bindings, the Date and the DateTime attribute values reflect the format mentioned in the locale contract.

          {{Declarations::order.deliveryDate; dateTimeFormat=Date}}
          {{Declarations::order.deliveryDate; dateTimeFormat=DateTime}}

          Some points to consider when defining the datetimeFormat attribute:

          • You can use the blank space or these special characters as separators in the datetimeFormat attribute [:, /, -, .].
          • The strings of the format options (for example, dddd) in the datetimeFormat attribute can’t be translated.
          • If the defined macro value for the datetimeFormat isn’t in the ANSI or the ISO 8601 format, the result is shown as ###.
          • If the defined format string contains an invalid character (other than the prescribed format strings), the result is shown as ###.
          • The datetimeFormat attribute supports additional formats. For more information, see Additional Date and Time Formats.
           
          Loading
          Salesforce Help | Article