a. Display a pop-up to the end user: A Request Email has been sent for Access.
b. Create a Custom Object “Account Sharing Request” and add an Entry in this object:
AccountID, OwnerID, RequestedBy(UserID),IsApproved(False) for the request.
2. Create an Approval process for Account Sharing Request in the controller class and send an approval request email to the record owner.
3. Enable email approval response so that the user can approve or reject the request by replying to the email: approve, approved, yes, reject, rejected,or no.
4. Update IsApproved field to True upon approval: This is the Final approval action.
5. Update trigger on the Account_Sharing_Request__c object would add the requested User to the Account Team and Account share Object.