Add a Product Category for the Staff View Order Process
Administrators can create a product category record to provide a custom result in the Staff View order process. A product category record can be used to display results like "New Merchandise" or "Highest Selling Merchandise".
- From Setup, enter
Custom Metadata Types
in theQuick Find
box, then select Custom Metadata Types. - Click Manage Records next to the Product Category custom metadata type.
Click New.
- In
Label
, enter an easily recognizable term to identify this product category using Pascal Case. - In
Display Name
, enter the name of custom label to be used as the product category text. Optionally, in
Query
, enter the name of the the query record that controls what is shown in this product category.The
WHERE
clause on the query record must includeName LIKE '%:searchQuery%
andEntity
. Example:
.Name LIKE '%:searchQuery% AND Entity__c = :entityId
Optionally, in
Class Name
, enter the name of the Apex class that controls what is shown in this product category.You can either use a query or an Apex class to control what is shown in this product category. When using one method, be sure to leave the field for the other empty. Example:
Query
:ExampleQuery
,Class Name
: (empty
).Optionally, in
Display Order
, enter a number to signify where within the list of categories this product category should be shown in the Staff View order process. The lower the number, the higher the name is shown on the page.The number should be 0 - 999.
Consider spacing out your numbers to accommodate future additions to the category.
Avoid:
Category 1:
1
, Category 2:2
, Category 3:3
, Category 4:4
Better:
Category 1:
10
, Category 2:20
, Category 3:100
, Category 4:500
- Click Save.