web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Dialog Process throws error

(0) ShareShare
ReportReport
Posted on by

I am executing a Dialog which uses a custom workflow assembly to generate SSRS report and attach the report PDF  to Email. The email activity is passed to the custom workflow as a lookup parameter (EntityReference). When the Dialog is executed then below error is thrown.

Unhandled Exception: Microsoft.Crm.CrmException: The data required to display the next dialog page cannot be found. To resolve this issue, contact the dialog owner or the system administrator.

*This post is locked for comments

I have the same question (0)
  • Mohammad Atif Profile Picture
    on at

    not sure  much on this error message but it could be the due to the Conditional Branch to another page is failing. please change Conditional Branch to update fields rather than going to another page

    Thanks,

    Mohammad

  • Brian Geraghty Profile Picture
    2,040 on at

    Can you post a screenshot of the dialog process?

  • Community Member Profile Picture
    on at

    2450.error1.GIF

  • Brian Geraghty Profile Picture
    2,040 on at

    Has this process ever worked? Did it stop? My general experience is that making decisions based on a response indicated in a workflow can pretty easily go awry. Could you maybe write the response down to the record in question and then make decisions based on what was written to the record?

    Just a thought, let me know if that doesn't make sense.

    ~Brian

  • Community Member Profile Picture
    on at

    Brian,

    thanks for the response, it works for System Administrator.

    I created a new security role and grant all the privileges similar to 'System Administrator' and tested the Dialog, still fails. However, when I logged in as System Admin it work.....

  • Brian Geraghty Profile Picture
    2,040 on at

    Could it have to do with the process ownership? does the sysadmin own the process in question?

  • Katharine Turbyfill Profile Picture
    on at

    I just hit this exact same error trying to pass a Lookup as an EntityReference to a custom workflow activity as well. Did you ever figure this out?

  • Suggested answer
    Community Member Profile Picture
    on at

    Just for the record. Had the same problem. I was trying to read an input argument from a Custom Activity Workflow that was null (optional parameter in the CAW specs).

     

    SPECS:

    [Input("Description")]
    [ReferenceTarget("site")]
    public InArgument<EntityReference> inArgument_Site { get; set; }

    HINT: Is not required, ie. can be null.

    ERROR:

    Guid vSiteId = inArgument_Site.Get<EntityReference>(context).Id;

    SOLVED

    Guid vSiteId = inArgument_Site.Get<EntityReference>(context)!=null?inArgument_Site.Get<EntityReference>(context).Id:Guid.Empty;

    Hope this helps someone.

    Jaume

  • Suggested answer
    Lance Russell Profile Picture
    on at

    Your plugin code should catch any exceptions and then re-throw an InvalidPluginExecutionExecption so you can see what actually went wrong:

            protected override void Execute(CodeActivityContext executionContext)
            {
                ITracingService tracingService = executionContext.GetExtension<ITracingService>();
    
                //Create the context
                IWorkflowContext context = executionContext.GetExtension<IWorkflowContext>();
                IOrganizationServiceFactory serviceFactory = executionContext.GetExtension<IOrganizationServiceFactory>();
                IOrganizationService service = serviceFactory.CreateOrganizationService(context.UserId);
                try
                {
                    tracingService.Trace("Starting up");
                    //Do work.                
                }
                catch (Exception e)
                {
                    tracingService.Trace(this.DumpException(e));
                    throw new InvalidPluginExecutionException(e.Message, e);
                }
            }
    
            private string DumpException(Exception e)
            {
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(e.Message);
                sb.AppendLine(e.StackTrace);
                if (e.InnerException != null)
                {
                    sb.AppendLine(this.DumpException(e.InnerException));
                }
                return sb.ToString();
            }
    


  • Nehal Gaikwad Profile Picture
    35 on at

    I faced a similar kind of issue. Thanks for sharing this code. It helped me a lot to identify the exact cause.

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
ScottDurow Profile Picture

ScottDurow 2

#2
GJones Profile Picture

GJones 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans