Dynamics GP Workflow Issues, Server Error in “/” Application

 

Yesterday I been through a wired issue with Dynamics GP Workflow, after activating Vendors Addition and Purchase Order workflows users were getting the below message when trying to open any workflow:

Server Error in ‘/’ Application.


Runtime Error

Description: An application error occurred on the server. The current custom error settings for this application prevent the details of the application error from being viewed.
Details: To enable the details of this specific error message to be viewable on the local server machine, please create a <customErrors> tag within a “web.config” configuration file located in the root directory of the current web application. This <customErrors> tag should then have its “mode” attribute set to “RemoteOnly”. To enable the details to be viewable on remote machines, please set “mode” to “Off”.

<!– Web.Config Configuration File –>

<configuration>

<system.web>

<customErrors mode=”RemoteOnly”/>

</system.web>

</configuration>

Notes: The current error page you are seeing can be replaced by a custom error page by modifying the “defaultRedirect” attribute of the application’s <customErrors> configuration tag to point to a custom error page URL.

<!– Web.Config Configuration File –>

<configuration>

<system.web>

<customErrors mode=”On” defaultRedirect=”mycustompage.htm”/>

</system.web>

</configuration>

I doubled check the web.config and been sure that the web.config in the inetpub folder has the <customErrors mode =”off”>, after doing many researches I found another web.config located in the below path:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\LAYOUTS

Which has the <customErrors mode =”on”>, switching off this returned the actual error behind the workflow as shown below:

Server Error in ‘/’ Application.


The application encountered an unhandled system exception. Contact your system administrator for details.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.Services.Protocols.SoapException: The application encountered an unhandled system exception. Contact your system administrator for details.
Source Error:

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a “Debug=true” directive at the top of the file that generated the error. Example:
<%@ Page Language=”C#” Debug=”true” %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug=”true”/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.

Stack Trace:

[SoapException: The application encountered an unhandled system exception. Contact your system administrator for details.]

System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall) +413241

System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) +300

Microsoft.Dynamics.GP.Proxy.DynamicsGP.GetCurrencyList(CurrencyCriteria criteria, Context context) +98

Microsoft.Dynamics.GP.Formatter.GetCurrencyList(DynamicsGP service, Boolean useHttpUser) +505

Microsoft.Dynamics.GP.Formatter.CacheCurrencyFormatData(String webServiceURL, Boolean useHttpUser) +85

Microsoft.Dynamics.GP.Workflow.DocumentViewer..ctor() +159

ASP._layouts_dynamics_workflow_gp_vendorviewer_aspx..ctor() +18

__ASP.FastObjectFactory_app_web_dynamics_workflow_gp_vendorviewer_aspx_2a428413__lml_jl2.Create_ASP__layouts_dynamics_workflow_gp_vendorviewer_aspx() +31

System.Web.Compilation.BuildManager.CreateInstanceFromVirtualPath(VirtualPath virtualPath, Type requiredBaseType, HttpContext context, Boolean allowCrossApp, Boolean noAssert) +138

System.Web.UI.PageHandlerFactory.GetHandlerHelper(HttpContext context, String requestType, VirtualPath virtualPath, String physicalPath) +50

System.Web.MaterializeHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +425

System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +263


Version Information: Microsoft .NET Framework Version:2.0.50727.5448; ASP.NET Version:2.0.50727.5456

That was a new challenge, trying to figure our the resolution behind the new error, doing more researches returned that such an issue are web-services related issues as the workflow was unable to read information from Dynamics GP, you will need the administrator user you are using to run the services to the BDC Administrator role in web-services administration console.

The issue will be resolved!!!


Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

Error Converting Request to Purchase Order–Business Portal 5.1

 

I have installed Business Portal 5.1 for one of my customers and been through the below error in converting Purchase Request into Purchase Order

The specified Protocol is invalid

Doing researches about this subject returned that the web.config of the business portal might be missing from this path “C:\Program Files\Microsoft Dynamics\Business Portal” and it was!

To resolve this I have connected to another client whose running the business portal with no issues and copied the web.config! It worked perfectly, below is the web.config content:

<?xml version="1.0" encoding="utf-8" ?>
<
configuration>

<
system.web>

<
xhtmlConformance mode="Legacy" />

</
system.web>


<
appSettings>

<
add key="Protocol" value="1"/>
<
add key="TaxEngineServiceAssembly0" value="Microsoft.Business.Taxes.Services"/>
<
add key="TaxEngineServiceClass0" value="Microsoft.Business.Taxes.TaxEngine"/>

<
add key="TaxEngineDataServiceAssembly0" value="Microsoft.Dynamics"/>
<
add key="TaxEngineDataServiceClass0" value="Microsoft.Dynamics.Common.TaxEngineData"/>

<
add key="TaxEnginePreCalculateDocumentEventAssembly0" value="Microsoft.Dynamics"/>
<
add key="TaxEnginePreCalculateDocumentEventClass0" value="Microsoft.Dynamics.Common.TaxEngineISV"/>
<
add key="TaxEnginePreCalculateDocumentEventMethod0" value="DocumentPre"/>

<
add key="TaxEnginePreGetTaxGroupIDsEventAssembly0" value="Microsoft.Dynamics"/>
<
add key="TaxEnginePreGetTaxGroupIDsEventClass0" value="Microsoft.Dynamics.Common.TaxEngineISV"/>
<
add key="TaxEnginePreGetTaxGroupIDsEventMethod0" value="PreGetTaxGroupIDs"/>

<
add key="TaxEnginePreCalculateCodeEventAssembly0" value="Microsoft.Dynamics"/>
<
add key="TaxEnginePreCalculateCodeEventClass0" value="Microsoft.Dynamics.Common.TaxEngineISV"/>
<
add key="TaxEnginePreCalculateCodeEventMethod0" value="PreCalculateCode"/>

</
appSettings>

</
configuration>

Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

Dynamics GP Workflow – Workflow is incorrectly activated

 

Looks like it is the Workflows week! I been in a situation with one of my clients who also had an issue with the workflow, their “Vendors” been suddenly start requesting for approvals once they creates a new vendor and the below message shown on the left panel:

“Unable to Connect to Remote Server”

During the investigation I noticed that the vendor workflow was not activated in the workflow system! Which was very wired situation.

While digging into this I found that the setup they had for the Workflow is incorrect, they had the Microsoft Dynamics Workflow Location is different that the Office Server Location which made this error:

image

Fixing this miss resolved our issue!

Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

Dynamics GP Workflow Backup

 

It has been a very tough month, me and all my team which now are 12 consultants in Dynamics Innovations are overloaded with tasks and projects assignments, I am travelling to Jeddah – KSA the upcoming couple of hours and wanted to post some articles before it leave my remaining rooms of my mind!

I been in a situation the last couple of days were one of my customers had a failure in their portals server that holds the Workflow and the Business Portal, after performing the reinstallation and making sure that all systems are up and running, I realized that the workflow I have created for this clients is a tree with 7 levels in depth and 900 lines of conditions that checks the cost center for each purchase order line and redirect the purchase order for the concerned department manager for first line approval! In addition, imagine the documents that will be lost during the maintenance procedure and the documents that will be stuck between the workflow and Dynamics GP!

I been lucky having a planned backup performed on daily basis, where I been able to restore the backup and proceed with the production environment smoothly.

Worth to mention that when I used the backup set I had for the Workflow database it failed to launch the applications! I had to restore the entire web application from the SharePoint Central Administration portal to get this done.

I wanted to share the script I used to schedule the daily backup, it is basically a batch file that will be called by Windows Scheduler daily and will command the STSADM to perform a backup to specific folder, that will be automatically created based on the backup date, replace “<servername>” with your actual server name and “<port>” with your actual port:

@ECHO OFF
@SET STSADM=”c:\program files\common files\microsoft shared\web server extensions\12\bin\stsadm.exe”
for /F “tokens=1-4 delims=/- ” %%A in (‘date/T’) do set DATE=%%B%%C%%D
for /F “tokens=1-4 delims=:., ” %%a in (‘time/T’) do set TIME=%%a%%b%%c

echo Workflow Backup Operation Started….

%STSADM% -o backup -url http://<servername>:<port>/sites/DynamicsGPworkflow -filename “C:\WSS Backups\Daily Backups\Workflow\Workflow_%DATE%_%TIME%.dat”

echo Business Portal Backup Operation Started….

%STSADM% -o backup -url http://<servername>:<port> -filename “C:\WSS Backups\Daily Backups\Business Portal\BP_%DATE%_%TIME%.dat”

echo Farm Backup Operation Started….

MD “C:\WSS Backups\Daily Backups\Farm\FARM_%DATE%_%TIME%”
%STSADM% -o backup -directory “C:\WSS Backups\Daily Backups\Farm\FARM_%DATE%_%TIME%” -backupmethod full

:End

Paste this into NOTEPAD and save it with “.CMD” extension to be an executable package and schedule the run periodically.

Enjoy!

Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

Time Estimation for Packages Installation

 

Sometimes I like the way packages estimates the time required to install! Today I have installed Service Pack 2 for Dynamics GP 2010 R2 Workflow and got the below message:

image

Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

There is no Web named /BP/Administration, The language is not supported on the server

 

When you install business portal, you might face the below error:

Feature Id: BP Home
Location: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\FEATURES\BPHome
Action: Install
Exception: The language is not supported on the server.
Stack Trace: at Microsoft.SharePoint.Library.SPRequest.CreateWeb(String bstrUrl, String bstrTitle, String bstrDescription, UInt32 nLCID, String bstrWebTemplate, Boolean bCreateUniqueWeb, Boolean bConvertIfThere, Guid& pgWebId, Guid& pgRootFolderId, Boolean bCreateSystemCatalogs)
at Microsoft.SharePoint.SPSite.CreateWeb(String strUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere, Guid webId, Guid rootFolderId, Boolean createSystemCatalogs)
at Microsoft.SharePoint.SPSite.SPWebCollectionProvider.CreateWeb(String strWebUrl, String strTitle, String strDescription, UInt32 nLCID, String strWebTemplate, Boolean bCreateUniqueSubweb, Boolean bConvertIfThere)

Your issue is basically related to your server language, just go and change the language on the server to English / United States and enjoy!

Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com

How to add attachments to Purchase Order Workflow?

 

I got a request from one of my customers to add attachments to Purchase Order Approval and I thought this might be useful for others, follow steps below to add attachments:

1. Click on Documents in Workflow:

image

2. Click on any document Title:

image

3. Click on Edit Item:

image

4. Click on Attach File:

image

5. Select file to attach:

image

6. Notice the attachment icon:

image

Enjoy!

Regards,

Mohammad R. Daoud MVP – MCT
MCP, MCBMSP, MCTS, MCBMSS
+962 – 79 – 999 65 85
me@mohdaoud.com
www.mohdaoud.com