To configure the availability of the upload signed document button
- Navigate to Object Manager > Agreement > Fields & Relationships.
- Click New.
- Select Data Type as Formula and click Next.
- Enter the Field Name as UploadSignedDocument_Custom2 and enter Field Label as Upload Signed Document Custom.
- Select Formula Return Type as Text and Click Next.
-
In the Upload Signed Document (Text) field, enter the formula and click
Next.
Sample
IF(AND( ISPICKVAL(Apttus__Status_Category__c,"Request"), (ISPICKVAL(Apttus__Status__c,"Request") ) ), IF (OR ($User.UIThemeDisplayed == 'Theme4d', $User.UIThemeDisplayed == 'Theme4t', $User.UIThemeDisplayed == 'Theme4u') , HYPERLINK("/apex/Apttus__LightningOfflineDocumentImport?action=UploadSignedDocument&id=" &Id, IMAGE("/resource/Apttus__Button_UploadSignedDocument", "Upload Signed Document"),"_self" ) , HYPERLINK("/apex/Apttus__OfflineDocumentImport?action=UploadSignedDocument&id=" &Id, IMAGE("/resource/Apttus__Button_UploadSignedDocument", "Upload Signed Document"),"_self") ) ,NULL)
- According to your requirement, set Field-Level Security for Profile and click Next.
- Select the page layouts that should include the Upload Signed Document field and click Save.