Site Search:
Sign in | Join | Help

Handle Dialog Box From GP using Continuum API

Last post 04-26-2010 8:44 AM by RamzyEbeid. 5 replies.
Page 1 of 1 (6 items)
Sort Posts: Previous Next
  • 05-25-2009 8:28 AM

    Handle Dialog Box From GP using Continuum API

    Dear All

    I am working with VS2005, C#, Developer tool kit, GP 10.

    I am trying to use Continuum API to handle the response of Dialog Box
    because I can't do that using Developer tool kit.

    So I did create a new application "Microsoft Dynamics GP Add-in" C#

    I have this error: "Specified cast is not valid"

    I build my solution and I add the DLL in this path: C:\Program
    Files\Microsoft Dynamics\GP\AddIns

    Please I need your advise please.

    And I wrote the below Code

    using System;
    using System.Collections.Generic;
    using System.Text;
    using Microsoft.Dexterity.Bridge;
    using Microsoft.Dexterity.Applications;


    namespace HowToTestContinuumAPI
    {
        public class GPAddIn : IDexterityAddIn
        {
            // IDexterityAddIn interface
            public static Dynamics.Application GPAPP = new Dynamics.Application();
            public GPCallbackClass GPCallBack = new GPCallbackClass();
            enum focus_type
            {
                PRE = 0, CHANGE, POST, PRINT, ACTIVATE, FILL, INSERT,
                DELETE, MODAL_DIALOG         }
            enum attach_type { Before = 1, After }       

            public void Initialize()
            {       
            //Dynamics.DIALOG_RESPONSE
           
            GPAPP.RegisterFocusTrigger("window 'IV_Transaction_Lot_Numbers' of
    form 'IV_Transaction_Entry'",
                8, 1, GPCallBack, "POP_Lot_Entry_Dialogs");       

            }
    GPAPP.SetParamHandler(GPCallBack);


        }
    }



    ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    ////////////////////////////////////////////////////////////////////////////////////////////////

    using System;
    using System.Collections.Generic;
    using System.Text;

    namespace ContinuumAPIProjectCSharp
    {
        public class GPCallbackClass
        {
            public GPCallbackClass()
            {
            }
            public void POP_Lot_Entry_Dialogs(int dialogType, string prompt, ref
    string
            control1, ref string control2, ref string control3, ref int answer)
            {
                if (dialogType == 0 && prompt == "Are you sure you want to
    remove all lot numbers?")
                {
                    answer = 0;
                    HowToTestContinuumAPI.GPAddIn.GPAPP.StopProcessing();
                }
            }
        }
    }

    • Post Points: 37
  • 05-28-2009 3:58 AM In reply to

    Re: Handle Dialog Box From GP using Continuum API

    Dear all

    i need your help please

    • Post Points: 1
  • 05-28-2009 8:23 AM In reply to

    Re: Handle Dialog Box From GP using Continuum API

    I'm sorry... I've never used Continuum. Anyone?

    • Post Points: 1
  • 04-24-2010 8:03 PM In reply to

    Re: Handle Dialog Box From GP using Continuum API

    Hi,

    Are you sure that dialog boxes can't be handled by the the Developer toolkit?  This is my problem as well.  I you have found out how to reply to dialog boxes using the toolkit, I would appreciate hearing about it.

     

    Jim

    • Post Points: 19
  • 04-26-2010 8:39 AM In reply to

    Re: Handle Dialog Box From GP using Continuum API

    GP 10 doesn't allow it, but GP 11 does.

    • Post Points: 19
  • 04-26-2010 8:44 AM In reply to

    Re: Handle Dialog Box From GP using Continuum API

    it is wokring now for me, on GP 10

    thank you,

    • Post Points: 1
Page 1 of 1 (6 items)