You are here: Commerce Process > Commerce Documents > Accessing, Hiding, and Reading Attributes

Accessing, Hiding, and Reading Attributes

OVERVIEW

In general, for attributes to appear on documents, they must be included in Document views on a layout.

However, there are ways to set a user's access to an attribute, hide an attribute altogether, and read an attribute that isn't on a view or layout.

ADMINISTRATION

ClosedSetting an Attribute's Access

  1. ClosedNavigate to the Attribute List page.
  1. Click Admin to go to the Admin Home Page.
  2. Click Process Definition in the Commerce and Documents section.

    The Processes page appears.

  3. For the process you are interested in, confirm that Documents is selected in the Navigation drop-down menu, and click List.

    The Document List page appears.

  4. For the main document, confirm that Attributes is selected in the Navigation drop-down menu, and click List.

    The Attribute List page appears.

  1. Click the Name of an attribute.

    The Attribute Editor page corresponding to the attribute type appears.

  2. Click the Document Views tab.

    The Document Views tab allows the FullAccess user to control the access level of an attribute to users in different steps/ profiles of the Transaction. The FullAccess user can change the attribute access levels to the following in a certain step/ participant profile:

    Access Level Description
    Read-Only The attribute cannot be edited in this step or participant profile for the current user.
    Read/Write The attribute value can be edited in this step or participant profile for the current user.
    Hide The attribute will not be displayed in this step or participant profile to the current user.
  3. Click Apply to remain on the current page or Update to return to the Attributes List page.

ClosedHiding Attributes

  1. ClosedNavigate to the Attribute List page.

    1. Click Admin to go to the Admin Home Page.
    2. Click Process Definition in the Commerce and Documents section.

      The Processes page appears.

    3. For the process you are interested in, confirm that Documents is selected in the Navigation drop-down menu, and click List.

      The Document List page appears.

    4. For the main document, confirm that Attributes is selected in the Navigation drop-down menu, and click List.

      The Attribute List page appears.

  2. Click the Name of an attribute.

    The Attribute Editor page corresponding to the attribute type appears.

  3. Click the Mapping tab on the Attribute Editor.
  4. Do one of the following:
    • To hide the Document attribute (or attribute set) in documents created for parts, models, product lines or segments: select one or more checkboxes.
    • To hide the Commerce attribute (or attribute set) in documents created for specific segments: select the Hide For Segments checkbox, and highlight the segments for which purchases should not include the attribute.
  5. Click Apply to save changes and remain on the page or Update to save changes and return to the Attributes List page.
    1. This functionality enables you to hide attributes in documents created for a single type of item.

      Example: If an attribute is hidden for parts, then the attribute would not appear in documents whose line items are for parts. However, if the line items are for parts and models, attributes marked ”hide for parts” would appear.

ClosedReading Commerce Attributes not on the Layout

If a Commerce attribute is not on the layout, but is not prohibited from view by the user’s Participant Profile, you can still read the current value of the attribute.

Call Bm.getAttrVal(“attrVarName”) from either the main document or the sub document to pull the latest value of an attribute by providing its variable name. For sub document attributes, the attribute value is from the current sub document, not all sub documents. Sub document attributes are not available on a main document page, and main document attributes are not available on a sub document page.

For example, you may need attribute values for attributes that it wouldn’t make sense to have on the layout for the user to see.

To use this JavaScript function, the attribute cannot be on the layout and cannot be marked as Hide by the user’s Participant Profile.

This functionality depends on the Desktop Transaction caching and Optimized Data Request size features. Turning either Desktop Transaction caching or Optimized Data Request size functionality off will disable this JavaScript function. For more information on these features, see Performance Best Practices.


NOTES

RELATED TOPICS

Related Topics Link IconSee Also