Quantcast
Channel: Microsoft Dynamics GP Forum - Recent Threads
Viewing all articles
Browse latest Browse all 14686

Pass through SanScript using the Continuum API Dynamics GP2013

$
0
0

I'm having issues executing the simplest code through the Continuum API for GP2013 R2.

I've heard this was possible, i have not been able to get it to execute properly.

Here's the sample code (taken from a previous post i saw from Mariano Gomez). This code worked fine in GP2010, but not in 2013. Any help would be appreciated, i'm at a standstill until i can get this resolved or find another solution to open GP forms from outside the context of Dynamics GP.

public int TestCode()
{
string dexErrorMsg=String.Empty, dexCmd=String.Empty;
int dexErrorCode=0;
Dynamics.Application objGPApp = (Dynamics.Application)Activator.CreateInstance(Type.GetTypeFromProgID("Dynamics.Application"));//new Dynamics.Application();

objGPApp.Activate();

dexCmd = "";
dexCmd += "open form 'RM_Customer_Maintenance';";
objGPApp.CurrentProductID = 0;
objGPApp.CurrentProduct = objGPApp.CurrentProduct + "";
dexErrorCode = objGPApp.ExecuteSanscript(dexCmd, out dexErrorMsg);

if (dexErrorCode != 0)
{
string errorMessage = dexErrorMsg;
}

return dexErrorCode;
}


Viewing all articles
Browse latest Browse all 14686


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>