function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sgsg 

Display Text message using Screen flow based related object record count

I have a custom button in a custom object and
on clicking the button,
It (Screen Flow) purchases reports from vendor portal based on information available in the record and creates another record in the related object.
Now, I have to display a text message( Reports already been purchased, Do you really want to continue?) to user when they try to click on this button even though there is a report which already has been purchased, Just to prevent unnecessary purchases.
But if they continue on purpose, it should be working as usual and purchase a report.
If that particular related object has more than 0 records, this popup should be displayed. Any ideas on how i can accommodate this in the existing flow? Any help or insights would be appreciated.
Arun Kumar 1141Arun Kumar 1141

Hi sg,

You can add new screen to achieve this . For the screen to be displayed, you can add conditions by getting all records of  related object using 'get records' and check  in decision if records are present in related object, if yes you can put the screen where you can display text 'Reports already been purchased, Do you really want to continue?' and use buttons 'yes' and 'no' for footer. If the user click yes then continue with your logic to purchase report, else if user chooses 'no' , then end the flow.

If you are updating any field value after the creation of related object or purchase of report, then your work will be eaiser, as you check the field value and create your condition in the decision box according to that.

 If this helps you please mark it as a best answer
Thanks!

sgsg
Hi Arun, Thanks for the response,  I have implemented the idea that you have suggested. In the decision element, I have added the logic to purchase reports when there is no reports already exists and End element when the reports already available. If the user still wants to purchase the reports even though the reports exists, how can i connect /continue the flow to purchase reports? Help needed. TIA.