Fields
Simple document metadata is located on the CM_Document_Version__c
custom object as custom fields. Medical Information Cloud Content Management ships with several custom fields. Medical Information Cloud Content Management 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 Document Version Custom Field
To create a custom field on CM_Document_Version__c
:
Navigate to the Fields & Relationships tab on the Document Version custom object.
From Setup, click Object Manager.
Click Document Version.
Click Fields & Relationships.
Click New.
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.
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:
Navigate to the Fields & Relationships tab on the Document Version custom object.
From Setup, click Object Manager.
Click Document Version.
Click Fields & Relationships.
Click the hyperlinked Field Label for the field that you want to add help text to.
Click Edit.
Enter custom help text into the Help Text field.
Click Save.
Hover your mouse over the Info icon next to the field on a layout to see the field-level help text.
Create Corresponding Field Record:
To make a CM_Document_Version__c
custom field available to document layouts, create a corresponding CM_Field__mdt
record.
Navigate to the
CM_Field__mdt
records list.In the Quick Find box in Setup, search for and select Custom Metadata Types.
In the Field row, click Manage Records.
Click New.
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 to be associated with 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.
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:
Enable the feature on the Default MCM Global Setting metadata record.
Navigate to the Default (
CM_Default
) metadata record of the MCM Global Setting (mvn__CM_Global_Setting__mdt
) custom metadata type.Set the Enable Edit Metadata on Check Out (
mvn__CM_Enable_Edit_Metadata_Checkout__c
) field totrue
.Click Save.
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.