Debug custom workflow in CRM
If you have any doubt in the post please post comments. I will try to solve your problem.
To debug the custom workflow in CRM on premises and online is different ways.
If you have any doubt in the post please post comments. I will try to solve your problem.
To debug the custom workflow in CRM on premises and online is different ways.
CRM OnPremises
In CRM on-premises sever attach the below process to debug custom workflow.
- w3wp.exe
- crmAsyncService.exe
If the custom workflow is configured as "Sync" then you have to attach w3wp.exe process in the visual studio.
This is way can't be use in CRM online.
CRM OnLine
With the help of "plugin registration" we can debug the custom workflow.I have mentioned below the steps to debug it.
You must first define/register your custom workflow in the CRM by adding steps in your process.
Step:1 Open the plugin registration tool and connect to CRM online. Click install profiler if it not installed already
Step:2 Once you installed profiler you can select the plugins profiler and click "profile workflow"
Step:3 In profile settings window select your workflow in the workflow lookup and steps will be automatically populate check it. If steps is not populate then you have to use your custom workflow in the CRM and come again and do it.
Step:4 Check the persist to entity and click ok button
Step:5 After click ok button. If the error occurs
"Automatic workflow cannot be published if no activation parameters have been specified" then you have to configure workflow in CRM as "OnDemand" to solve this error.
Step:6 Goto process now you can see your selected added with name embedded with profiled.
Step:7 Thats it.Now you can trigger the workflow.
Step:8 Once you triggered the workflow. Go to "plugin profiles" and open relevant plugin record.
Step:9 Click on the “Serialized Profile” tab and copy the value specified in the “Serialized Profile”
.
Step 10. Create a new text file and copy the “Serialized Profile” value into it and then save the file.
Step 11. Go back to the Plugin Registration Tool, select the profile created earlier and click on the Debug button.
Step 12 In the opened Debug window, select the newly created text file in the Profile Location field and the Custom Workflow Activity assembly in the Workflow Activity field.
Step 13 Open your Custom Workflow Activity project using Visual Studio.
Step 14 Put the break point in your code and attach the debugger to the Plugin Registration Tool process and click the Start Execution button in the Plugin Registration Tool debug window.
Step:9 Click on the “Serialized Profile” tab and copy the value specified in the “Serialized Profile”
.
Step 10. Create a new text file and copy the “Serialized Profile” value into it and then save the file.
Step 11. Go back to the Plugin Registration Tool, select the profile created earlier and click on the Debug button.
Step 12 In the opened Debug window, select the newly created text file in the Profile Location field and the Custom Workflow Activity assembly in the Workflow Activity field.
Step 13 Open your Custom Workflow Activity project using Visual Studio.
Step 14 Put the break point in your code and attach the debugger to the Plugin Registration Tool process and click the Start Execution button in the Plugin Registration Tool debug window.
The below steps are how to trigger the "OnDemand" workflow in the CRM
Step:1 Open any entity click "Run workflow"
Step:2 Select your custom workflow and click add now workflow get trigger
Hi Alagunellaikumar,
ReplyDeleteI need to debug my custom workflow and I am following your blog. Can you please clear me the line "select the newly created text file in the Profile Location field" in Step 15... I didn't get which text file are you saying about.
... with Best Regards
I have updated the post please look now.
DeleteHi Alagunellaikumar,
ReplyDeleteMany thanks for updating your blog. It worked for me. I was facing some problem with the debugging, and but now I am able to perform my job. It will prove very helpful for me.
Many thanks once again.
All the Best!!
Could you please let me know how to stop the profile
ReplyDeleteThis comment has been removed by the author.
DeleteThere is an option called Stop profiling in the plugin registration tool.
DeleteI can't see the Stop Profiling option for Workflows. I have used this often for Plugins, but I can't work out how to stop profiling for workflows.
DeleteHi,
ReplyDeleteThough I placed the Custom Workflow Step in CRM, I still dont see it. My workflow is real-time workflow and it is not on-demand.
Could you please help me out
Have you registered the custom workflow in the plugin registration tool and also check it must be enable state.If you have still facing issue explain it detail.
DeleteI am also getting the same issue. Custom workflow steps are not listed in drop down in Profile Workflow.
DeleteI can't see any custom workflow steps in the drop down list to select can you help me
ReplyDeleteDid you import it in CRM using plugin registration tool?
DeleteI found custom workflow steps only appear if they have been given a description in the workflow editor. If it still says 'Add your description here' in the step definition it will not appear!
DeleteBrilliant, thanks for posting
ReplyDeleteHi Alagunellaikumar,
Deletein CRM 2011, On-premise
I have tried as you explained but the Custom workflow is not either failed or succeed.
if I check the workflow ,the status shows "Waiting"
also I am not able to find any "Plugin - Profile" records
Do you have any idea
Thanks
Sam
I have CRM 2016 Online, and this doesn't work for me - When I try to click on OK button in "Profile Workflow" settings window, it gives me an error saying "Object reference not found"
ReplyDeleteHi Alagu
ReplyDeleteI am not able understand on-premises dubbing. May you explain more on it?
Thank You
Hi, Nice article, thanks for detailed steps. I am having issue in step 3 and you have mentioned I cannot see the steps. So as per your advice, I am trying to troubleshoot it. I have confirmed that Custom Workflow Activity which I wanted to debug is already being used in Workflow Process, but still do not show up in Debug profiler.
ReplyDeleteCan you please elaborate what exactly you mean by "If steps is not populate then you have to use your custom workflow in the CRM and come again and do it. "
Appreciate your response.
Great write up. I'm using CRM 2016 and do not see where the "plugin profile" is located in CRM. Any help is appreciated. Thanks.
ReplyDeleteGreat work. You have written really great content.Kik for PC
ReplyDeleteThis is really great write up. Very easily understandable.Download IMO for PC
ReplyDeleteI think you have a great article here, But let me share with you all here about my experience with a loan lender called Benjamin Lee who helped me expand my business with his loan company that offered me a loan amount of 600,000.00 USD which I used to upgrade my business months ago. He was really awesome working with him because he a Gentle man with a good heart, a man who can listen to your heart beat and tell you that everything will be OK, when I contacted Mr lee it was on my Facebook page that his advert came up then I visited his office at Michigan to discuss about the loan offer that he and his company render, He makes me understand how all process go then I decided to give a try to it was successful just like he promised, yeah I believe him, I trust him, I rely on him as well about all my project he will be my dear financial officer and I'm glad my business is probably going well and I'm going makes my business growth like grass with his help.he work's with a great investors and guess what? They also give international loans. Is that not awesome to hear when you know a lot of business project are growing up each day by day in your heart hoping that you going to make income of that job to raise money for the project, Ops, then Mr Lee will help you with that, Yes international loan he will help you with that perfectly because I trust him very much for that kind of job, Look don't be shy or shaded give a possible try to Mr lee here his contact : 247officedept@gmail.com
ReplyDelete