Below code is working on GP2010 but not in GP2015. Don't know whats wrong.
string dexErrorMsg, dexCmd;
int dexErrorCode;
Dynamics.Application objGPApp = new Dynamics.Application();
dexcmd = "";
dexcmd += "open form RM_Customer_Maintenance;";
objGPApp.CurrentProductID = 0;
objGPApp.CurrentProduct = objGPApp.CurrentProduct + "";
dexErrorCode = objGPApp.ExecuteSanscript(dexCmd, out dexErrorMsg);
if (dexErrorCode != 0)
{
MessageBox.Show(dexErrorMsg);
}
Original Post: https://community.dynamics.com/gp/f/32/t/39562
Mariano any help on this again?
Thanks Much
Sandip Jadhav
*This post is locked for comments
David,
I have gone through Continuum documentation and created below VB.Net Code and it works fine. C# code is still not working.
This code to open Manufacturing Component Transaction screen. I need to schedule it every 10 second to open this screen. in AddIn folder Posting button push event is called which post transactions.
But it open one time and second time I get following error
And
If I re ran my .Net Application it get following error-
How can I avoid it? I think I need to close screen once posting is done. Can you please guide on same.
Below is code for your reference.-
Private Sub OpenGPMFGComponentScreen()
Try
Dim Err_Num As Integer
Dim ErrorMsg As String
GPApp.CurrentProductID = 346
Err_Num = GPApp.ExecuteSanscript( _
"open form MOP_Component_Trx_Entry;", ErrorMsg)
If Err_Num <> 0 Then
'A compiler error occurred. Display the error.
MsgBox(ErrorMsg)
End If
Catch ex As Exception
MessageBox.Show(ex.ToString())
Finally
End Try
End Sub
David,
Much appreciate for your prompt reply. How can I check if Dexterity session is running?
Your earliest reply is highly appreciable.
Thanks much
Sandip
Do you have a Dexterity session open, or any other Dexterity based application including stand alone applications?
Because this would get a connection and would not have the RM_Customer_Maintenance form and so give you that error.
For your code to work, there must be ONLY one Dexterity/Dynamics application loaded.
David
Hi David/Manikandan,
I have reinstall Dynamics GP and my code stopped working. I am getting error "Unknown Identifier 'RM_Customer_Maintenance'."
I have checked only one instance of Dynamics GP is running.
I don't know whats wrong how can I troubleshoot this error? Is code is not stable?
Any help on this will be highly appreciable.
Thanks much
Sandip
Hello,
Sorry for delay in reply. There were threeGP Instance was running that was reason getting all kind of errors. After removing extra instance my code was working.
Thanks much everybody for your help.
Tks
Sandip
Do you have more than one Dynamics/Dexterity/DPS application running?
When using the Dynamics.Application() object it will connect to the first instance only.
Make sure you only have one instance running.
David
Hi sandip,
What is the error message you are getting? What is the triggering point of this script?
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,113 Super User 2024 Season 2
Martin Dráb 229,918 Most Valuable Professional
nmaenpaa 101,156