hello hi hi sir tar can you introduce yourself yes sir as you know my name is t Sharday uh like uh 6 months back I started learning about sales Po and then I explored about it as well as like uh then I get started with the admin part so in the admin I learned about uh the data modeling UI customization from online courses UI customization data security and reports and dashboard these all things as well as flows uh later we I got an internship in Salesforce there in that my major task or the task which
which were given to me was on flows so yeah that is something which I had done in my six months of duration okay that's great tashar so since you have already worked on flows let's have some question with flows only are you ready yeah sure sir okay so can you just provide me a brief in description What flows is okay so sir like flows are no code solution provided by Salesforce earlier when flows were not there like we for everything like for creating UI for any UI functionality for every single thing we need to write
the code but now we can do apply Logics we can do lots of things like for Loop DML Lots of logical part can be done uh using drag and Dr tool I can say uh which is flows okay so once you say that uh earlier we didn't had any option and we need to write the code what do you think what do you have your opinion about other automation tools which are point and click only okay so about other automation tools like uh there is in data modeling which I I remember like there was Val
validation rule automation if I specifically talk about automation tools uh which are like process Builder uh and workflow rule yeah so what do you think so that's the question right so do you think we we don't have an option before flows that we can create a valid we can create a validation for data modeling let's say or we can create a process Builder we can use process builder for automating task let's say sending an email all those things can't we use uh do we need to write code for them still yeah actually like uh process
Builder and workflow rule are there but they are with the limitation like uh if I'll talk about for Loops it's it's it's not possible through process Builder applying a for Loop and all and workflow Rule and that's why Salesforce came up with a new solution which is flow which is having more better UI more Dragon like more flexible and it comes up with lots of other things like querying data which is also an uh one one more thing which is not possible through process Builder or uh DEC decision were there in process builder in workflow
rule criterias were there but yeah fall Loops query uh these are the things which were not possible through even process Builder or even uh the workflow tool so that's why Salesforce even wants to expire both of those tools and they they have officially declared that uh they'll be expiring it in 2025 and they'll not give any update on them they there will be only one and the only one automation tool like flow and other than that there is a approval process kind of thing which is also there in process automation great so we have some
limitation get got it so can you tell me uh since you have already created flows and you have an experience of how to create flows what limitations do we have in flows okay so uh in flows there are some limitation like I need to comp like if I'll compare it with coding part so uh like in record triggered flow if I'll say in record triggered flow we have events like update create delete but there is no undelete event other than that uh like uh in flows there is no way of write using map collection directly
without using Apex so like these are there in Apex part map and all but that is not there in flows other than these limitations these are all about trigger record triggered flows and all but if I'll talk about other like a screen flow limitation so we'll compare the screen flow with u lightning WB component so there are lots of flexibility we have it like when it comes to lightning WAP component of course Salesforce is coming up with new new updates inflows to make Salesforce as a completely no code solution but it is like uh still
for now we can only create simpler uh Solutions on flows not that much complex solutions for complex Solutions we have to go on like uh aex part the coding part aex and lwc okay great so do you think do we have Governor limits with the flows as well yes it is same as uh in the development part like the the same Governor limits which are there in the Govern uh development part are same exist on flows as well so can you specific specify some that let's say okay I got I get it we have 50,000
limit for fetching the records we have uh we can only do some dmls all those all those limits we have anything else we have with flows yeah there is one more limit of using number of elements in flows that is I guess 2,000 okay what does that mean can we have like uh if I am creating a flow and then I'm using start element for Loop multiple different different types of elements then there is a limit of using those elements within a single flow that is 2,000 okay let's say if we have two records and
one of them executes 1500 limit of elements okay so if you say 2,500 is gone with one record does second has 2,000 limit or it will have only it will it will again have 2,000 which flow we are using in this case let's say record Trigg flow so uh yeah and we are getting two records we are basically putting two records when we put two records the flow get executed and when the two records are getting there and what happens so for a single record 1 1500 element will get executed the second one also 1500
will get EX yeah so both the interviews will be executing in the same transaction so I guess it's going to be like uh uh like 15 it's going to exceed the limit of 15 2,000 elements to be used in flows but don't the don't uh does not the flows execute on a single record yeah it executes record trigger flow executes for a single record but what I have observed it executes for multiple records uh within a single transaction it does not create two separate transaction for the records that is something which I have I have
observed okay so what do you think how do we optimize a flow uh in order to optimize a flow it's uh like uh all we we should be using some best practices like if we are using a get record element then we need to uh instead of catching all the records from the database we should be if we have conditions based on some criterias we want the records to be F so add the query level at the get record level itself we should be applying the conditions criterias and then the filter record should come other
than that we should avoid using for Loop kind of logic if if we can work with simple while loop or simple if conditions then it's very well and other than that what we can use is no trigger autol launch flow that is something which we can use as a subflow of uh normal flows so from a normal flow we can call uh autol launch flow no no trigger Auto launch flow and so to reuse different different common functionalities within the flow we can create some common autol launch flow that is also the way we can
do it yeah and uh other than that uh it's uh like uh yeah so these are the things I I can think of right now okay so tell me uh are you aware about elements in flows elements in flows yes okay so can you tell me what is the use of element that is transformed okay uh not sure about it but yeah I had used it but it's like I have used only once uh uh so I'm not able to recall it but maybe uh it works on collection variable and it do something for on
the collection variable maybe it sorts them on a saddening order but I am not very sure about it like I don't remember okay so have you ever used the any other element such as get records yeah I did use multiple times like get record so can we query records with the get records on two objects uh we can only like there is only like whenever we create a get record element it it first at the very first moment itself it asks the on which object you want to query and then second step is it's ask
for like what are the uh criterias it should fulfill then the third step is what all Fields you want to query so so it's not going to give any any option to select two objects there so that's not possible what if the objects are linked even then if if even though they are linked that is not possible okay so let's consider a scenario we are querying contacts with the get records mhm and when we display let's say we have a screen so first we get the record then we have a screen in the screen we
are displaying the contact information which we have queried up right and once we are showing on the screen we have contact name contact number contact uh email all those information basic and then we have account name account uh from the account object we have website can we have that when we have used a query on the contact yeah we can do it uh like uh okay it's not possible like uh through that get record it's not possible to go at the higher level that is for that we have to write a custom query in Apex
because dot notation is something which I am not like I haven't I'm not able to recall this thing but yeah I think right now that it's not possible to access the parent fields from a query only single level Fields could be queried if I'm writing a query on contact I cannot access account Fields so do check it uh definitely I'll I'll I'll check this particular thing so if you say we cannot query then let's move to the next part and can you tell me about uh how to handle recursion inflows okay uh is is there
any specific scenario or in general I have to specify no just imagine that we have creating a we updating a record and that once records get updated it's again executes the update which is record trigger flow update record trigger flow and then it goes goes on and on and we want to handle it how can you please repeat sir what you said so considering there is a record which is getting updated uhhuh and once the records get updated there is a record trigger flow already which gets executed again in that record TR flow we are
updating the same record so it's again and again getting executed the flow is getting again and again called okay so can how can we handle it okay so in order to handle this kind of recursion first of all uh I have one solution to stop this recursion what we can do is if we if we want to make the changes in the same record and we are using record trigger to flow then we should go for uh like the fast field update section and there inside that if we are making the change in the same
triggering record as well it's not going to affect it's not going to trigger another record trigger flow for the same object so so that is the solution that is the optimized way it's not better to update the same record the values which are coming right onto the value which we need to put is coming from an API which we are hitting okay so once an API has been hit uh the value which is came we want to put that value on the that on the particular record and once we update that record now it again
executes the same flow so that's how it goes another another point over here like I I think like it's not possible to update the fields of the same triggering record in after part because I have observed that it's read only in case of after but yeah if it is happening because I also have like like some I I'm also like able to recall that somehow how once I had also tried it and it worked again after I am able to update the same triggering record okay there are two things the first one is update the
triggering record when you directly use that update okay on the triggering record the second one is we fetch the record since we have the record ID right we are using that record ID and we are fetching that record again and then we are updating it okay so at that time we don't have any read only okay so in after then we are calling an API right and getting the response and accordingly we are updating the same record and okay so in that case uh what we can do is we can we have to take the
help from flows in that case or we can use a custom settings in that case like uh we can create a Boolean variable in the custom settings object and then that variable we can update as true and we can make it as false accordingly according to that if conditions we can handle that or other than that we can uh create a field of on the record that is not I think it's not a good practice but if if the client allows then I am going to I can go for that solution as well that I
can create a checkbox field and I can check the checkbox when I am updating it so when it enters again in the flow it will check that checkbox is true if it is true then I not going to call again the API and all or making the update so it's not going to H the cion will not happen the third solution which I can think of is Apex I can write uh I can create a static variable in upex and I can access a variable that particular class variable not a static or uh I can
access I think uh from flows the Apex variable and I can change its value men we can access it can you tell me how if we want to execute a method from epex uh sorry if you want to execute a method of epex from flow how do we do that we can access the variables like why I said it what variables let's say we have a method now me calling a method is something which I never did it and I don't think it is possible what if we want to call an auto launch flow from
epex if you want to call an uh autol launch flow then we have to take help from visual force page of visual force page or from there we can call uh up no nothing else if we can do you think we can call in directly without using anything else just we have an autol launch flow we have an epex class can we call the auto launch flow from the epex class not sure if any predefined method for doing that but I haven't did it okay okay no problem since we have Governor limits in Epic and
the same we have in flows for epic we can use something which is a synchronous epic do we have anything which is asynchronous flows something like that to overcome the limits uh like when it comes to record triggered flows there is something called as asynchronous path which they provides and that asynchronous path is is not related to batch and all those things but yeah what happens there in like uh it is called a synchronous because it we can apply a frequency we can set like we when it we want it to be called like you
are telling about scheduled path right yeah scheduled path in record Tri flow mhm come that's that's something different I'm talking about can we do something which is asynchronous uh other than that yeah I I I can like I don't know if there is any asynchronous part in the core flows but yeah the newly added orchestration flow that is something I can say as a synchronous but where like if I'll see the documentation and all it doesn't says that these are this is as synchronous one more thing to specify on this uh that when it comes
to uh uh what I was saying like uh when it comes to like I forgot what I was saying no problem okay can you tell me how to uh so if we have any errors in epex right we can monitor them we can have monitoring and logging system what about if we have any errors in flows how do you Monitor and see the errors there are multiple ways uh the standard way which Salesforce provides is we can see the interviews the failed ones the succeeded one that is one option from the quick find box we
can find all the flow interviews and other than that uh we can always do error handling in flows and and in that like in an in that error handling we can store the errors in any custom object if we want or if we want to store the error in uh like if you want to send that error through mail we can do that as well okay since you mentioned in the last answer that you have not this last the previous one you mentioned that we have orchestration flow right m MH so do we have okay
so can can you tell me what all elements do we have in the orchestration flow record trigger orchestration flow to be specific okay so uh like u in orchestration flow there are like few things uh I haven't tried it much but yeah I can I can think of some staging thing like stages are there multiple stages and uh at every level there are some actions we can perform either we we can uh show our screen or we can perform some actions not very sure about okay let's say we want to get records and show onto
the screen in orchestration flow can we do that uh like orchestration like if I'll tell you the purpose of orchestration flow it is used for workflow manage like uh Work Management like if let's say I I was the person who who is assigned with some task so I on my on on my or on a particular record let's say opportunity record I need to do some task on opportunity record so that will be displayed that task will automatically appear and once I'll perform that task and make it done then it's going to go uh like
it's going to get marked as done and then it will move to the next person who will be performing the next particular part uh task for that same opportunity record okay I'll rephrase the question and make it better that is do we have get records in record trigger orchestration flow we have uh not sure again I haven't used much uh do we have uh update records any DML sort of thing we have these things like I do remember like we have multiple things there in like uh an orchestration flow do consist of two things uh
screen flow and record flow but yeah like and these flows do consist of multiple multiple elements whatever the elements you want get record whatever the things required are all present in these screen flows or record Trigger or the auto launch flow so yeah orchestration in orchestration flow we can use these flows so if so indirectly we can use any get record whatever the element we want yeah we can use different flows but do we have these elements in the orchestration flow not very sure okay no problem uh can you tell me the difference between a
record triggered flow and record triggered orchestration flow uh record triggered flow and record orchestration record triggered orchestration flow record triggered orchestration flow means like uh the orchestration the Work Management is starts from uh creation of the record or updation of the record or deletion on a particular change in a record then the orchestration will initiate what about the record FL record trigger flow is the flow which executes in the background immediately but orchestration is the flow which which executes and it it it doesn't end till the time the user like it also involves user interaction
basically so that is the difference which orchestration flow creates okay great to thank you thank you sir