Slow Down To Speed Up w/ Logs

  • 5 February 2021
  • 0 replies
  • 1 view

So… You have a complicated process to automate. You are going to start building it. Oh… You already built the whole thing? Did you test it? It got an error? Why is it broken? You don’t know why? Did you use a log action? You don’t know what a log action is? YOU came to the right place…

 

Before we get too far lets talk about best practice. If possible with any sized project you want to test as you build. This way you know when something works and upon adding something it breaks… you know what caused it. The below information will still apply to this scenario but its always good to test more often then not at all.

 

Where testing often doesn’t work is when the project is already built and now you are trying to reverse engineer where its stuck or why its stuck.

 

Pop in a Log action…

 

10045i018D88B9DD69AC95.png

 

The “Log to instance details” action will allow you to see during and after a test run what values ‘variable-wise’ are going into your workflow. In the picture above I am adding a log action to my workflow. I set it up so that I will get a name value to later evaluate but I am getting an error. A name is not coming in. To see what is merging in I added the same variable “Name” into my log.

 

Now I test...

 

Honorable Mention best practice award goes to the “Workflow Testing" button shown below. Thank you test button. You save many clicks and screen loads…

 

10046iC2E2E04EBE81E8E7.png

 

While testing… I see this…

 

10047i837944D4F5BE8F6D.png

 

I mapped the wrong value coming from Salesforce and get the ID of the record instead of the name field. A simple fix.

 

In general log actions are a great way to not bang your head on the desk for hours trying to figure out why. When in doubt drop a log action in there. It will save you a ton of time. Especially when you are testing new NWC features like Assigning a task to multiple users

 

 

Thanks for reading!

-Dave


0 replies

Be the first to reply!

Reply