This is a small component that is shown only on Referrals with Microsoft. Use it to manage the Microsoft Solution records in relation to the current Referral. It can be placed on a Referral page. OOTB is on the Referral Lightning page when Partner ID = Microsoft.
LWC shows a list of MicrosoftSolution__c records (Name in regular font + Solution ID in smaller font below it) that are linked to the current Referral via ReferralMicrosoftSolution__c records.
LWC has an Edit button in the top right corner.
Clicking Edit switches the component into edit mode:
- The edit button changes into the Save and Cancel buttons.
- A trashcan button appears next to every record in the list; clicking on it removes the record from the list.
- Below the list appears a picklist, which is empty by default. The picklist pulls all MicrosoftSolution__c records in the org and displays them as <Name> (<SotutionID__c>) values for selection.
- If a value is selected, the selection is added to the list of Solutions above the picklist, and the picklist resets to being empty.
- The newly added Solution in the list also has a trashcan button next to it.
- When the user clicks Save, the DML operations are performed:
- A ReferralMicrosoftSolution__c record is created for every new Solution that is added, linking the current Referral to the selected MicrosoftSolution__c record.
- The ReferralMicrosoftSolution__c records corresponding to every Solution that was removed are deleted.
If there are no MicrosoftSolution__c records linked to the current Referral via ReferralMicrosoftSolution__c:
- The LWC is rendered in edit mode.
- The Save button is disabled.
- A message is shown under the header in red: “Please add at least one Solution before the referral can be shared with Microsoft.”
If the Referral has Sourced to Partner = Microsoft and there are no MicrosoftSolution__c records linked to it via ReferralMicrosoftSolution__c, then the Integration Status LWC should display Last Sync From Salesforce Status: Paused, Message: “Referral was not sent to Microsoft because no Solution has been specified.”
Comments
Article is closed for comments.