 Hello, everyone. I'm Sanjay Gupta. I welcome you on Sanjay Gupta Tech School. In this video, I'm going to demonstrate a scenario related to screen flow. So let's understand the requirement of this demonstration. So this requirement is related to build a screen flow. So we need to place a screen flow on two different report pages. So I will be creating one flow and that one flow will be placed on two different report pages. So first is account record base and second will be case. And I will be running that screen flow through both the record pages. So the requirement says create a text field on account called alert note. Then create a screen flow that displays the account alert note. Add the screen flow to the account lightning page at the top of the right column. Like we do for any screen flow, we place it on the record page. Then add a visibility filter that only shows the element if a value is present in the alert note for the account. So if this alert note field is having some value, then only your flow will be visible on the record base otherwise not. So this is the first requirement. Second requirement says like add the same screen flow to the case lightning page at the top of the right column. Add a visibility filter that only shows the flow if a value is present on the alert note for the related account. So case should be related to a particular account if on account that alert note field is having some value, then only that flow should be visible on the case record page. So alert note field will be available on account object only. We don't need to create it on case. So let's implement this. Then I will be coming to this requirement again so that I can relate like what I implemented. So I'm creating new flow. Before creation of flow, I need to create that field as well. So I'm moving to account object fields and relationships new. So here you can see I need to create a text field on account called alert note. So I'm going to create a text field naming it as alert note length let's say 255. Next visible to all the profiles next and save. So this way I created the field. Now I can create the flow. So I'm selecting screen flow create right. So here I'm going to create a variable named as record ID because I will be placing this flow on either account or case record page. And from both the places, the current record ID will be received and that ID will be stored in this record ID variable. So if we place it on account, so accounts ID will be available in this record ID. If we place the flow on case record page, so case ID will also be available in this record ID. So through this demo, you will get to know like how single record ID variable will be having two different record IDs, not at same time. One time it may be account or another time it may be case. Now I need to get account information. So get record, get account details. Object I'm choosing as account. ID is equals to record ID and only the first record and automatically store all fields and done. Right. So this way in this flow, like I receive the account information now I need to create a screen. So display alert note. Now here I'm using display text. So if you want to display some value of the field, so you can just use display text. So display account alert note. And okay, I need to remove these spaces because in API names, we can't provide these spaces. So I'm putting underscores then get account detail dot alert note. Right. And I'm selecting it, changing its color to red. It is not selected. Okay. Now it is converted to red and I am increasing its size as well, making it bold and done. Right. So this way, first half of the requirement is implemented. So let's test it first. So I'm just saving it. So I saved it as alert note activating it. Now I just need to open the sales application so that I can have account tab. So I'm opening it into new tab, moving to accounts tab, opening account record. Then I'm going to add it this page. So from left hand side, I'm going to select the flow and dragging and dropping it here. Right. So it is already selecting alert note because it is started from A. So it is the first flow. That's why it's selected by default. If you save it with different name. So from this list, you can select your flow and enable this checkbox. Right. So it is selected. Now I'm clicking on save. Right. So if I go to the requirements, so we created a text field, then we created a screen flow that displays the account alert note. Then we need to add the screen flow to the account lightning page at the top of the right column. So this piece we did. Then it is saying add a visibility filter that only shows the element if the value is present in the alert note for the account. So what we can do, select this flow component and at the bottom, you can see we have this add a filter option. So here we can set the component visibility. So clicking on add filter. And from here, I am selecting the field alert note, not equals to and blank. So if it is not equals to blank, then only it will be rendered on the UI, otherwise not. And wherever you apply visibility filter on the component, so this icon will be available. Right. So now I can save it moving back. So right now you can see flow is not visible. If I go to details, so I will be able to see this alert note. So it is blank. So that's why that flow is not visible. So if I fill alert, let's say I'm filling the text as alert and clicking on save. So you can see this flow is visible now. Right. Now what you need to do, like this flow is having only one screen. You don't want to pause. You don't want to finish. You just want to remove this footer as well as you want to remove this header as well because you just want to use this flow as a placeholder so that you can highlight value of particular field on the page. Right. So what you can do, just go to your flow, open the screen and like you can configure the header, you can remove a header and you can remove footer as well. Click on done, save as a new version of this flow and save and then activate. So it is showing in the warning like your screen is not having any navigation. So nothing to worry because we don't want to navigate around this screen because we have only one screen. So now if I refresh the page so you won't see header and footer up with the flow. You can just see the message. So if you want to see the value of particular field on this page so that you can highlight something. So for that requirement you can basically use this concept. Now if I blanket out and save, so you will see flow is disappeared. So that is because of that component visibility. Right. So I am just adding that note again so that we can view it. Now to complete the other requirement, like add the same screen flow to the case lightning page and do same. So I am considering like if I place it on any case record page. So initially it will be placed on all the case record pages. But if case is connected with the account then only it will work because through account we will be able to get this alert note. Right. Now we need to modify our flow because we created this record ID. So this record ID now will be receiving either account ID or case ID, case record ID. Right. So we need to decide like from which record you are basically running your flow. Either it is account or it is case. So if you open any account record so you can see the account ID. So for each account record ID always starts with 001. Right. So you can see like I have opened account 101. So it is starting with 1001. If I open any other account randomly. So here also you can see ID is starting with 001. So for each account ID always starts with 001. Now let's jump to case. So if I open any case record. So you can see case ID is starting with 500. So this is the catch. Right. So what we can do, we need to apply a decision. We need to apply a decision so that we can check the record ID starting with 001 or 500. So I'm just updating the flow now. Applying a decision. Check record ID. So here I'm writing account. So if record ID starts with 001. So it belongs to case. Sorry. It belongs to account. Then if record ID starts with 500. So it belongs to case. Done. So we have two parts here. So I am just ending it and ending it. Right. So case path is already implemented. Now we need, sorry, account path is already implemented. Now we need to implement the case path. Right. So I am using get record element so that I can fetch the case information. So get case details. Object we need to select case. Now here ID equals record ID. Okay. And only the first record and automatically store all fields. So this record ID resources having sometimes account, sometimes case, accordingly it will work. So we already applied a decision if it is having account ID. So account path will run. If it is having case ID, so case path will run. Now here we can have our screen. So case alert node and here we need to have display text. So its API name is case display case alert node. Now here we need to insert the resource. So get case, get case details dot. So on case we have a look up to account. So here you can see this account is available. So I am clicking on it. And from here I am just having this alert node. Right. So I am changing its color to red, increasing the size and making it bold. Then removing header footer as well and done. So this way case part is also implemented. Right. Now I am clicking on save as and creating a new version. Okay. So it is showing warning because we removed the footer. So navigation removed. But no worries. We can just click on activate. Now I am already on case record page. So what I need to do, I need to edit this page. And I clicked on edit page. So on case record page I am going to place the flow. So from left I am searching flow and I am placing it here. So alert node flow we need to select. Record ID, this checkbox we need to select. And here also we need to set the component visibility. Right. Because on case if account is populated and if that account alert node is filled then only this flow should be rendered. So add. So we need to go to advanced then select. So you need to select the record account name. Then alert node. Done. So record means case record. Through case we went upon account and through account we fetched alert node. If it is not equals to blank then only this flow will be rendered. So this way this filter is applied. Now I am clicking on save. It is asking for activation. So I am activating it for sales application only. Now moving. Okay. So let me just click on save once again. Moving back. Okay. So here you can see account which is linked is test 12. So this test 12 is not having alert populated. So I am just opening this account. So you can see that flow is not available here as well. So I am moving and filling this alert. So let's say this time I am putting warning message clicking on save. So it is available here. Now if I go to related case let's say I am opening this one. So here also it is available. If I go back and if I open another case. So here also you can see this warning message. So now if I open this 1026 it is related to account but still that flow is not appearing because this account is not having that alert node populated. Right. So this way I hope you understood like how we can place one flow on two different report pages and how we can identify from which record ID is coming and accordingly we can run particular path. So now I hope you understood the whole requirement. So this way I explained you how to place a screen flow on two different report pages. Thank you.