If you use the old SharePoint workflow and then upgrade to GP 2013 or higher and decided to use the new Workflow 2.0 functionality you need to disable the Sharepoint workflow or you can get conflicts.
In my case, a company had been sold and was moving from a GP 2010 environment with SharePoint workflow to a new server with Workflow 2.0. SharePoint wasn’t installed on the new server but Workflow 2.0 worked fine in testing. Then we tried to test AP and GP would crash with the message than an error had occurred.
After a lot of troubleshooting with MS, the problem was that SharePoint was was trying to create the frame around the AP window and causing the crash either in conflict with Workflow 2.0 or because the SharePoint site had been removed.
The fix was a SQL statement to disable the SharePoint workflow like this:
Use Dynamics
Update sy01500 set WorkFlowEnabled=0 Where CMPANYID=X
(where X is the company ID)