Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics GP (Archived)

Pass through SanScript using the Continuum API Dynamics GP2013

Posted on by Microsoft Employee

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;
}

*This post is locked for comments

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

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