The next concept that we are going to understand is about using process builder to auto submit cards
for up to what in fact this is under the laws and feature of process builder.
The capability of this tool to work in combination with other tools that actually makes the story even
more effective and even more powerful like process builder works in combination with approval process
process builder works in combination with Phil's process builder works in combination with Apex process
builder works in combination with another process.
So basically this capability of this tool to work in combination with other tools is what makes it even
more effective.
So that we are let's discuss one scenario that we'll be using process builder to auto submit cards for
actively basically combining the capability of a process builder and an approval process and using this
how do we automate submit a recording records for let
in the previous sessions why we were learning about the approval process the creation and approval process
in the system.
And that goes with that extra curricular object and for this approval process redefines the entry criteria
on the various steps in.
And we're wrong the apple elections objection actions everything we activated that and we also did some
basic troubleshooting techniques so when looking with approval process we discussed everything in detail.
Now let's use the same approval process and let's use it in combination with other process.
So engendered.
How does absolute process works.
This is for the extracurricular object so basically the extracurricular object when you create a new
record and then you the person hits submit for approval so that the record goes to approve the entry
criteria for this is that the admirable goal should be Knight set of cards created with the Knight Capital
code or eligibility and they are submitted for approval.
So for submitting it for accurately it requires a manual intervention that is that a card owner should
go and hit the button submit for capital and hand that a guard goes through the approval process.
So that design would normally looks and that doesn't any approval process normally works.
So this sort of scenario then that a card will not manually submits that a card for approval of this
manually thing can be automated using the process.
So now let's create a process that involves using this existing approval process and let's understand
how to automate the whole process using process.
Let's create a new process filling the details at a card changes save.
Now let's define the object in our scenario it is the extra curricular activity.
And this also gives a message that is already has a process.
This is definitely a very useful message because we need many scenarios we will be able to combine many
processes together into a single process.
So it is always good to know that other processes do exist.
But now let's create a fresh one and we say wow when leaving a record is created safe.
Criteria the criteria is when the extracurricular activity the approval code is not so that does other
criteria.
So let's define our criteria here the criteria a name is given
and let's assess the conditions here the approval code equals
the approval code of night and when this criteria is met basically what has to happen.
The approval process has to be automated automatically stocked it.
So here is the action type choose.
Submit for approval so that the right guard gets automatically submitted for the action name authors
submit the record for Apple.
And here choose the specific approval process.
And as we already have the approval process in place we'll be able to find the approval process expected
to us with an all access court and here is an option for you to skip.
Then three criteria.
So if you want to skip the entry criteria choose this option.
Otherwise let's leave it off.
And in this scenario the entry criteria is same.
So for us let's skip the entry criteria because it is the same.
But otherwise based on the business requirement you can choose this accordingly.
And the current submitted and also this submission comments.
Let me keep it simple.
Sage.
So now we have defined our immediate action and the immediate action the action type this submit for
approval.
So we have a completely configured of a process.
Let's activate the process for effect now that other process is activated.
It's time for us to test it out.
So I'm in extra curricular object.
Let me create a new new record and let me say
math and science.
And let me say that I can't perfect.
Now that it's running into some errors we can save this record because artists I've met this process
fail.
All right.
So meaning the process that we create created fail.
And if we had the error message asked this and I'm handled Ford has occurred in the flow and this has
occurred like processing the flow.
OK.
So this is a very generic error message right.
So this is that message that we have it say some on handled to Ford so ask and I mean now if we see
this error message for debugging this error message we need debug blocks.
So this is exactly the reason I wanted to show you the Z error message so that we can understand the
importance of debug blogs.
So in this similar scenario when we have a very generalized error message we should know where to start
debugging the right we should know where they edit this one and then we can go and fix that error.
But this generalized yet on message doesn't give us a big meaningful thing for us to go and debug in
a specific place.
So here comes the importance of debug logs only has admins if we know how to use efficiently use a debug
logs we will be able to easily overcome these kind of scenarios.
All right.
So now that we have this generalized error message let me go use debug logs and see what the error is
go to debug logs
and let's create a new debug logs to be generated
so far creating new debug logs what do we need to do this.
We already have these trace flags set
let's updated with the time.
So basically we want to debug logs are to be generated in a particular time frame.
Right.
So let's choose the time frame the time frame currently.
And let me say for another 24 hours and that is a maximum that we can set it for maybe you can just
choose like 10 minutes or 30 minutes based on your requirement so we have now set it up.
So now that we have set the timings for the debug logs automatically from the second build the time
you have chosen the end time everything that you do in the application will get recorded so based on
that we'll be able to easily find out where the Atavus now that we have said that he belongs.
Let's replicate this scenario.
Let me also take a screenshot of this effect.
All right.
Now let me try to create a new record Matt and science the same record basically.
All right.
So now that we are getting there it again go back to debug logs to refresh the screen.
You should be able to see the new logs that are generated.
So here to view and here is a debug log basically which I recorded that transaction that you just did
so you can see all the details who logged in and everything.
And then it says flow create auto submit extracurricular activity.
Basically this process started and then he had his vetted phase right once that process started.
It was able to find that applicable process.
Yes.
And then notify the extracurricular activity in charge approval based on flight response.
And then this app list requires the next chapter where it will be determined by the manager feet.
All right.
But when then the process was trying to do this it failed and handled for it has occurred on this float.
So you had of executing the flu.
So here is where the head of this the effort is when it requires the next to approve to be determined
by the manager feet this valueless EMT.
Please contact your administrator for more information.
All right.
So this is where they Atavus in the approval process.
We have defined it to be the next ama.
We have defined it to be the next step.
Alert will be the manager.
But the field is the manager field is empty.
And that is the reason the process fit.
So now I think we can compare the difference in the error message that we get in the application and
then the debug logs in the application it was pretty much a very generalized out of the message about
that and it said and ham handed forward.
However in the debug log it gives the very clear error message off there.
Exactly it went wrong.
So that's an argument if we if we know how to use the debug logs efficiently we can very much overcome
most of the issues that we have in our everyday test.
In fact I specifically wanted to show you the zebra and also the method of debugging the same using
the debug logs.
So that is why I left the manager feel empty.
And now let's fill in the manager fee and retry that
popular the manager and save that clerk.
Now let's try again.
Arts and Science
perfect.
So now that as soon as I created the extracurricular activity recorded with the no will call it automatically
guard submitted for approval and based on how we have designed it approval process it goes on accordingly
through the various steps and actions.
So this is how we combine process builder a process and also an appellate process.