Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

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

Posted on by 2,745 User Group Leader

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.

public sealed class MyCWAWorkflow : CodeActivity

{

[Input("ContractID")]

[ReferenceTarget("contract")]

public InArgument<EntityReference> ContractID { get; set; }

[Input("CustomerID")]

[ReferenceTarget("contact")]

public InArgument<EntityReference> CustomerID { get; set; }

[Input("QuoteID")]

[ReferenceTarget("quote")]

public InArgument<EntityReference> QuoteID { get; set; }

protected override void Execute(CodeActivityContext executionContext)

{

//Create the tracing service

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

*This post is locked for comments

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans