Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 79901

What happen if The input parameter is NULL in Custom Workflow Activity of Type Entity Refence CRM 2011

$
0
0

Hello Experts ,

I need to understand one thing here. I have written a custom workflow activity with 3 input( Contract,Customer & Quote)  arguments. all are of type entity reference. Suppose the Quote ID passed as NULL from workflow then do I expect any error because I am analysing a defect which says as Index out-of-bound error. I am not using the input argument in code but for future work i have taken the Quote as input argument. So do you think if the Quote look up is passed as null from workflow to this CWA this error will be thrown? Sample of my code below given.

publicsealedclassMyCWAWorkflow : CodeActivity

{

[Input("ContractID")]

[ReferenceTarget("contract")]

publicInArgument<EntityReference> ContractID { get; set; }

[Input("CustomerID")]

[ReferenceTarget("contact")]

publicInArgument<EntityReference> CustomerID { get; set; }

[Input("QuoteID")]

[ReferenceTarget("quote")]

publicInArgument<EntityReference> QuoteID { get; set; }

protectedoverridevoid Execute(CodeActivityContext executionContext)

{

//Create the tracing service

ITracingService tracingService = executionContext.GetExtension<ITracingService>();


Viewing all articles
Browse latest Browse all 79901

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>