preload

GP/QTP Automation: Dynamics Continuum Integration Library

Posted by Albert Gareev on Sep 10, 2009 | Categories: Great PlainsLinks

All related posts: Reference Page – GP/QTP Automation  

Documentation 

Microsoft Dynamics Great Plains Continuum API Guide (http://mbs.microsoft.com/downloads/public/GP90Docs/ContinuumAPIGuide.pdf) is the only main published document, which is pretty short though. Many of available functionalities are just mentioned or briefly referenced but not documented in details. Exploring DLL library directly I was able to retrieve more details on the functionalities available. 

Dynamics.Application Object

dispinterface IApplication {

    properties:

    methods:

        [id(0x00000001), propput, helpstring(“CurrentProduct”), helpcontext(0x00000028)]

        void CurrentProduct([in] BSTR rhs);

        [id(0x00000001), propget, helpstring(“CurrentProduct”), helpcontext(0x00000028)]

        BSTR CurrentProduct();

        [id(0x00000002), propget, helpstring(“MacroError”), helpcontext(0x0000006e)]

        short MacroError();

        [id(0x00000002), propput, helpstring(“MacroError”), helpcontext(0x0000006e)]

        void MacroError([in] short rhs);

        [id(0x00000003), propget, helpstring(“ExternalProductName”), helpcontext(0x0000003c)]

        BSTR ExternalProductName();

        [id(0x00000003), propput, helpstring(“ExternalProductName”), helpcontext(0x0000003c)]

        void ExternalProductName([in] BSTR rhs);

        [id(0x00000004), helpstring(“GetDataValue”), helpcontext(0x00000046)]

        BSTR GetDataValue([in] BSTR Object);

        [id(0x00000005), helpstring(“Activate”), helpcontext(0x0000000a)]

        void Activate();

        [id(0x00000006), helpstring(“RegisterFormTrigger”), helpcontext(0x00000096)]

        short RegisterFormTrigger(

                        [in] BSTR FormName,

                        [in] BSTR MenuName,

                        [in] BSTR Accelerator,

                        [in] IDispatch* CallbackObject,

                        [in] BSTR CallbackMethod);

        [id(0x00000007), helpstring(“RegisterFocusTrigger”), helpcontext(0x0000008c)]

        short RegisterFocusTrigger(

                        [in] BSTR Field,

                        [in] short FocusType,

                        [in] short AttachType,

                        [in] IDispatch* CallbackObject,

                        [in] BSTR CallbackMethod);

        [id(0x00000008), helpstring(“RegisterShutdownRoutine”), helpcontext(0x000000a0)]

        void RegisterShutdownRoutine(

                        [in] IDispatch* CallbackObject,

                        [in] BSTR CallbackMethod);

        [id(0x00000009), helpstring(“StopProcessing”), helpcontext(0x000000e6)]

        void StopProcessing();

        [id(0x0000000a), helpstring(“RegisterDatabaseTrigger”), helpcontext(0x00000082)]

        short RegisterDatabaseTrigger(

                        [in] BSTR TableName,

                        [in] BSTR FormName,

                        [in] short TableOperations,

                        [in] IDispatch* CallbackObject,

                        [in] BSTR CallbackMethod);

        [id(0x0000000b), helpstring(“ExecuteSanscript”), helpcontext(0x00000032)]

        short ExecuteSanscript(

                        [in] BSTR CodeString,

                        [out] BSTR* CompileErrorMessage);

        [id(0x0000000c), helpstring(“SetDataValue”), helpcontext(0x000000b4)]

        short SetDataValue(

                        [in] BSTR Object,

                        [in] BSTR Value);

        [id(0x0000000d), helpstring(“StartWizardMode”), helpcontext(0x000000dc)]

        short StartWizardMode(

                        [in] short ModeSelector,

                        [in] IDispatch* CallbackObject,

                        [in] BSTR CallbackMethod);

        [id(0x0000000e), helpstring(“StopWizardMode”), helpcontext(0x000000f0)]

        void StopWizardMode();

        [id(0x0000000f), helpstring(“SetParamHandler”), helpcontext(0x000000c8)]

        short SetParamHandler([in] IDispatch* CallbackObject);

        [id(0x00000010), helpstring(“RegisterWatchTrigger”), helpcontext(0x000000aa)]

        short RegisterWatchTrigger(

                        [in] BSTR Field,

                        [in] IDispatch* CallbackObject,

                        [in] BSTR CallbackMethod);

        [id(0x00000011), helpstring(“MoveToField”), helpcontext(0x00000078)]

        short MoveToField([in] BSTR Field);

        [id(0x00000012), helpstring(“CreateFieldObject”), helpcontext(0x0000001e)]

        IDispatch* CreateFieldObject([in] BSTR FieldName);

        [id(0x00000013), helpstring(“SetDataValueEx”), helpcontext(0x000000be)]

        short SetDataValueEx(

                        [in] BSTR Object,

                        [in] BSTR Value,

                        [in] short FormatSelector);

        [id(0x00000014), helpstring(“GetDataValueEx”), helpcontext(0x00000050)]

        BSTR GetDataValueEx(

                        [in] BSTR Object,

                        [in] short FormatSelector);

        [id(0x00000015), helpstring(“VBE”), helpcontext(0x000000fa)]

        IDispatch* VBE();

        [id(0x00000016), helpstring(“CallVBAMacro”), helpcontext(0x00000014)]

        short CallVBAMacro([in] BSTR MacroName);

        [id(0x00000017), helpstring(“Show”), helpcontext(0x000000d2)]

        void Show();

        [id(0x00000018), helpstring(“Hide”), helpcontext(0x00000064)]

        void Hide();

        [id(0x00000019), propput, helpstring(“Visible”), helpcontext(0x00000104)]

        void Visible([in] VARIANT_BOOL rhs);

        [id(0x00000019), propget, helpstring(“Visible”), helpcontext(0x00000104)]

        VARIANT_BOOL Visible();

        [id(0x0000001a), hidden]

        IDispatch* CreateFormObject([in] BSTR FormName);

        [id(0x0000001b), hidden]

        short GetDexActiveWindow(

                        [out] BSTR* FormName,

                        [out] BSTR* WindowName,

                        [out] BSTR* DictName,

                        [out] BSTR* Title);

        [id(0x0000001c), hidden]

        long CountForms();

        [id(0x0000001d), hidden]

        IDispatch* GetFirstForm();

        [id(0x0000001e), hidden]

        IDispatch* GetNextForm();

        [id(0x0000001f), helpstring(“GetVBAGlobals”), helpcontext(0x0000005a)]

        IDispatch* GetVBAGlobals();

        [id(0x00000020), hidden]

        IDispatch* CreateTableObject([in] BSTR TableName);

        [id(0x00000021), hidden]

        BSTR GetBrowseString(

                        [in] short itemBtype,

                        [in] short itemForm,

                        [in] short itemScope,

                        [in] short itemIndex,

                        [in] short itemID);

        [id(0x00000022), hidden]

        void Quit();

        [id(0x00000023), hidden]

        IDispatch* GetMacroObject();

        [id(0x00000024), hidden]

        IDispatch* CreateFormObjectByID([in] short formID);

        [id(0x00000025), propput, helpstring(“CurrentProductID”), helpcontext(0x000001a4)]

        void CurrentProductID([in] short rhs);

        [id(0x00000025), propget, helpstring(“CurrentProductID”), helpcontext(0x000001a4)]

        short CurrentProductID();

        [id(0x00000026), hidden]

        BSTR GetBrowseString2(

                        [in] short itemBtype,

                        [in] short itemForm,

                        [in] short itemScope,

                        [in] short itemScope2,

                        [in] short itemComponentID,

                        [in] short itemIndex,

                        [in] short itemID);

};

Form Object

dispinterface IForm {

    properties:

    methods:

        [id(0x00000004)]

        short CountWindows();

        [id(0x00000005)]

        short GetID();

        [id(0x00000006)]

        BSTR GetName();

        [id(0x00000007)]

        IDispatch* GetWindow([in] BSTR WindowName);

        [id(0x00000008)]

        IDispatch* GetFirstWindow();

        [id(0x00000009)]

        IDispatch* GetNextWindow();

        [id(0x0000000a)]

        IDispatch* GetPreviousWindow();

        [id(0x0000000b)]

        IDispatch* GetLastWindow();

        [id(0x0000000c)]

        IDispatch* GetWindowByID([in] short windowID);

};

Window Object

dispinterface IWindow {

    properties:

    methods:

        [id(0x00000001)]

        IDispatch* GetWindowField([in] BSTR FieldName);

        [id(0x00000002)]

        long CountFields();

        [id(0x00000003)]

        short GetID();

        [id(0x00000004)]

        BSTR GetName();

        [id(0x00000005)]

        VARIANT_BOOL IsOpen();

        [id(0x00000006)]

        short GetHeight();

        [id(0x00000007)]

        short GetWidth();

        [id(0x00000008)]

        BSTR GetDisplayName();

        [id(0x00000009)]

        IDispatch* GetFirstWindowField();

        [id(0x0000000a)]

        IDispatch* GetNextWindowField();

        [id(0x0000000b)]

        IDispatch* GetPreviousWindowField();

        [id(0x0000000c)]

        IDispatch* GetLastWindowField();

        [id(0x0000000d)]

        IDispatch* GetWindowFieldByID(

                        [in] short fieldID,

                        [in] short fieldIndex);

        [id(0x0000000e)]

        IDispatch* GetScrollingWindowByID([in] short fieldID);

};

WindowField Object

dispinterface IWindowField {

    properties:

    methods:

        [id(0x00000001)]

        BSTR GetName();

        [id(0x00000002)]

        short GetID();

        [id(0x00000003)]

        BSTR GetProperty([in] BSTR propKey);

        [id(0x00000004)]

        VARIANT_BOOL GetFirstProperty(

                        [out] BSTR* propKey,

                        [out] BSTR* propValue);

        [id(0x00000005)]

        VARIANT_BOOL GetNextProperty(

                        [out] BSTR* propKey,

                        [out] BSTR* propValue);

        [id(0x00000006)]

        IDispatch* GetDatatype();

};

How to access Dynamics TypeLib document 

1)     Download and install Microsoft COM/OLE Viewer.

2)     Download and install IViewers.DLL add-in for OLE Viewer.

3)     Locate DEX.TLB file in Great Plains application’s installation folder.

4)     Open DEX.TLB using “File/View TypeLib” command of OLE Viewer


Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported
This work by Albert Gareev is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported.