15. September 2009 17:49
' VB Script to test the Axapta COM Connector.
Dim ComConnector
dim result
Set comConnector = CreateObject("AxaptaComConnector.Axapta3.1")
comConnector.Logon "","","",""
result = "Client Kind: " & comConnector.callStaticClassMethod("Global", "FWIClientKind")
msgbox (result)
result = "Com Connector " & comConnector.callStaticClassMethod("xInfo", "BuildNo") _
& " built on " & comConnector.callStaticClassMethod("xInfo", "compilationDate") _
& " at " & comConnector.callStaticClassMethod("xInfo", "compilationTime")
msgbox (result)
comConnector.logoff
set comConnector = nothing
// Prevent call to smmInit during installation of Axapta and BC sessions
if (!appl.isConfigMode() && clientKind() != ClientType::COMObject)
{
// Initialize the CRM init class
smmInit::initFromServer();
}
16. September 2009 14:54
// Prevent call to smmInit during installation of Axapta and BC sessions
if (!appl.isConfigMode() && clientKind() != ClientType::COMObject && !hasGUI())
{
// Initialize the CRM init class
smmInit::initFromServer();
}