Skip to main content

Fields

Simple document metadata is located on the CM_Document_Version__c custom object as custom fields. Komodo Publications Planning ships with several custom fields. Komodo Publications Planning custom fields are prefixed by CM_.

If you want to track additional metadata on CM_Document_Version__c, create a custom field on CM_Document_Version__c and then create a corresponding CM_Field__mdt record to make the custom field available to document layouts.

Note

The CM_ prefix is a protected system prefix. Never add the CM_ prefix to any metadata you create.

Create a custom field

To create a custom field on CM_Document_Version__c:

  1. Navigate to the Fields & Relationships tab on the Document Version custom object.

    1. From Setup, click Object Manager.

    2. Click Document Version.

    3. Click Fields & Relationships.

  2. Click New.

  3. Complete the fields in the New Custom Field wizard. This is where you will select and enter a data type, label, name, and description for your new custom field.

  4. Click Save.

Add field-level help text

Once your field is created, you can add custom help text to it. With field-level help, users can see a description of a field on layouts.

Note

Help text respects the field length configuration of the corresponding Salesforce field.

To add help text to a field:

  1. Navigate to the Fields & Relationships tab on the Document Version custom object.

    1. From Setup, click Object Manager.

    2. Click Document Version.

    3. Click Fields & Relationships.

  2. Click the hyperlinked Field Label for the field that you want to add help text to.

  3. Click Edit.

  4. Enter custom help text into the Help Text field.

  5. Click Save.

Hover your mouse over the Info icon next to the field on a layout to see the field-level help text.

Create a corresponding field record

To make a CM_Document_Version__c custom field available to document layouts, create a corresponding CM_Field__mdt record.

  1. Navigate to the CM_Field__mdt records list.

    1. In the Quick Find box in Setup, search for and select Custom Metadata Types.

    2. In the Field row, click Manage Records.

  2. Click New.

  3. Enter field information.

    • Label - enter a unique name.

    • Field Name - enter a unique API name.

    • SObject - select mvn__CM_Document_Version__c.

    • Field API Name - enter the Field API Name of your new field, eg. My_New_Field__c.

    • Child Relationship Name - leave blank.

    • Icon Name - enter the name of the Lightning Design System icon that you want associated to your new field. For example, standard:avatar. Visit Salesforce's Icons documentation.

    • Lookup Criteria - enter criteria if you want to restrict the valid values for the field. Visit Criteria Definition.

    • Lookup Subtitle Field Set Name - enter the API Name of the field set that contains the fields you want listed in the subtitle of the custom field when searching for the custom field. For an example, visit Products.

  4. Click Save.

For information on how to add fields to layouts, visit Layout configuration.

Enable users to edit document metadata

To enable users to click Edit Details on a document to modify its metadata, you must assign them the Edit Metadata document permission via the Edit Metadata (CM_Edit_Metadata) Permission (mvn__CM_Permission__mdt) metadata record. However, out of the box, these users can only edit the document metadata for documents that are not checked out. Documents that are checked out are locked such that the Edit Details button is disabled for all users, and no user can modify the title, description, or other details about the document. (The user who checked out the document can still make updates to the document file.)

To configure the default settings so that any user with the Edit Metadata document permission can edit the document metadata on checked out documents:

  1. Enable the feature on the Default MCM Global Setting metadata record.

    1. Navigate to the Default (CM_Default) metadata record of the MCM Global Setting (mvn__CM_Global_Setting__mdt) custom metadata type.

    2. Set the Enable Edit Metadata on Check Out (mvn__CM_Enable_Edit_Metadata_Checkout__c) field to true.

    3. Click Save.

  2. Clear the mcmDefault platform cache. For more information, reference Clear cache partition.

Once configured, any user with the Edit Metadata document permission can click Edit Details to modify the document metadata on checked out documents, even if the user is not the one who checked out the document.