PaulNieuwelaar / processjs

Other
51 stars 18 forks source link

Action Calling Custom Code - Object Reference #6

Closed MCas86 closed 6 years ago

MCas86 commented 6 years ago

I've got an action with 3 parameters:

Using Process.callAction, I pass the actionName and 2 input parameters per documentation. It calls the action and runs through the custom code just fine (walked through it multiple times without an issue) and then it still directs to the errorHandler and throws an object reference error.

Is this caused by not using the output parameter?

PaulNieuwelaar commented 6 years ago

Are you capturing the second parameter in the error callback? That should give you the stack trace if it's an error in your plugin. It should only hit the error callback if the action throws an error. Using the output Params is optional. Let me know how you get on. Paul

MCas86 commented 6 years ago

[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.SyncWorkflowExecutionPlugin]

Starting sync workflow '[actionName]', Id: [workflowid] Entering CustomActivityStep1_step: Sync workflow '[actionName]' terminated with error 'Object reference not set to an instance of an object.'

PaulNieuwelaar commented 6 years ago

Is your action calling a custom workflow activity? Looks like the error is in that.