Adding Assign Documents button on a custom object
Intro
The "Assign Documents" button allows a user to choose one or a number of document packs to be assigned to a contact.
By default, the button is available for the following objects:
- Contact - when you click on "Assign Documents", you can assign document packs to the contextual Contact
- Shortlist - when you click on "Assign Documents" when on a Shortlist record, you can assign document packs to all of the contacts added through a Shortlist Link to the contextual Shortlist
- Session - when you click on "Assign Documents" when on a Session record, you can assign document packs to all of the contacts added through a Session Invitation to the contextual Session
Custom Object Support
The "Assign Documents" button can be added on any other standard or custom object. Below, we have provided an example of adding the "Assign Documents" button on a Target Recruit's "Applicant" custom object.
- Go to Setup -> Object Manager -> and open the Job Applicant object (AVTRRT__Job_Applicant__c)
- Go to Field Sets and create a new field set with the name and label "AssignDocumentsContact"
- Add the Contact lookup field "Candidate" (AVTRRT__Candidate__c) to the field set and save.
- Go to "Buttons, Links and Actions" and create a new Action called "Assign Documents"
- Select the action type as "Lightning Web Component"
- Select the web component b3o:documentPackAssignmentAction
- Go to the correct Page Layout and assign the Lightning Quick Action to the record
Using the above instructions will allow you to use the "Assign Documents" button to assign a document pack to the candidate for an Application record.
Note: You can add multiple contact relationships, as long as they are all "first level" i.e. directly on the contextual object.