Skip to main content

Notifications

Announcements

No record found.

Project Service Automation forum

Change a Project Template Using a Workflow

Posted on by 250

Hello,

I want to change a project's template using a workflow.  Last week I was able to do this no problem on projects created in Dynamics. Today I'm trying it on projects that were created from imported data and getting the business process error below.  My workflow just has one line to update the template. Should I add more (check condition, delete)?

Any help or insight is appreciated!

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---> Microsoft.Crm.CrmException: An error occurred in the plug-in.

at Microsoft.Crm.Dialogs.RunWorkflowDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6E0FF311Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ActivityId>3e9ac862-7a76-4a33-be75-2eefb1969481</ActivityId>
<ErrorCode>-2147220970</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>System.Web.HttpUnhandledException (0x80004005): Exception of type 'System.Web.HttpUnhandledException' was thrown. ---&gt; Microsoft.Crm.CrmException: An error occurred in the plug-in.
at Microsoft.Crm.Dialogs.RunWorkflowDialogPage.ConfigureForm()
at Microsoft.Crm.Application.Controls.AppUIPage.OnPreRender(EventArgs e)
at Microsoft.Crm.Application.Controls.AppPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp; completedSynchronously): Microsoft Dynamics CRM has experienced an error. Reference number for administrators or support: #6E0FF311</Message>
<Timestamp>2018-10-02T16:43:37.4855537Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault>
<ActivityId>3e9ac862-7a76-4a33-be75-2eefb1969481</ActivityId>
<ErrorCode>-2147220891</ErrorCode>
<ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>An error occurred in the plug-in.</Message>
<Timestamp>2018-10-02T16:43:37.4855537Z</Timestamp>
<ExceptionRetriable>false</ExceptionRetriable>
<ExceptionSource i:nil="true" />
<InnerFault i:nil="true" />
<OriginalException i:nil="true" />
<TraceText>

[Microsoft.Crm.ObjectModel: Microsoft.Crm.Extensibility.InternalOperationPlugin]
[46f6cf4c-14ae-4f1e-98a1-eae99a37e95c: ExecuteWorkflowWithInputArguments]
Starting sync workflow 'Project: Change Project Template to New EMR Implementation ON DEMAND', Id: 6a1d705e-61c6-e811-a96c-000d3a1993e0
Entering UpdateStep1_step:
Sync workflow 'Project: Change Project Template to New EMR Implementation ON DEMAND' terminated with error 'An error occurred in the plug-in.'


[Microsoft.Dynamics.ProjectService.Plugins: Microsoft.Dynamics.ProjectService.Plugins.PreOperationmsdyn_projectUpdateProjectTemplate]
[035c5de4-ca94-4fd0-ac4f-43fe333cf8dd: Update of project template field for project]
Entered Microsoft.Dynamics.ProjectService.Plugins.PreProjectUpdate.Execute(), Correlation Id: 05036350-034b-419e-92ec-8ab517c02ace, Initiating User: d3553542-f09e-e811-a965-000d3a144347
Exiting Microsoft.Dynamics.ProjectService.Plugins.PreProjectUpdate.Execute(), Correlation Id: 05036350-034b-419e-92ec-8ab517c02ace, Initiating User: d3553542-f09e-e811-a965-000d3a144347
Entered Microsoft.Dynamics.ProjectService.Plugins.PreOperationmsdyn_projectUpdateProjectTemplate.Execute(), Correlation Id: 05036350-034b-419e-92ec-8ab517c02ace, Initiating User: d3553542-f09e-e811-a965-000d3a144347
Exiting Microsoft.Dynamics.ProjectService.Plugins.PreOperationmsdyn_projectUpdateProjectTemplate.Execute(), Correlation Id: 05036350-034b-419e-92ec-8ab517c02ace, Initiating User: d3553542-f09e-e811-a965-000d3a144347

</TraceText>
</InnerFault>
<OriginalException i:nil="true" />
<TraceText i:nil="true" />
</OrganizationServiceFault>

  • Matthew Lazowski Profile Picture
    Matthew Lazowski 3,163 on at
    RE: Change a Project Template Using a Workflow

    Also, it is worth taking a look at this thread that also talks about project templates. They can be applied in several ways.

    community.dynamics.com/.../293842

  • JonesEA_2018 Profile Picture
    JonesEA_2018 250 on at
    RE: Change a Project Template Using a Workflow

    Well, l guess everyone will just have to choose their templates wisely!

    Thanks for your time, Antti.

  • JonesEA_2018 Profile Picture
    JonesEA_2018 250 on at
    RE: Change a Project Template Using a Workflow

    Thanks for responding, Antti.  

    The imported records have the start date (estimated start date) populated but not the actual start date.  There are no time entries entered against any of them.

    I set a project manager but no other resource assignments. I don't understand why a template was applied. I have no business rules set on project.  Where does the value for a default template get set?

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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Coming on 11/8!

In our never-ending quest to help the Dynamics 365 Community members get answers faster …

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans