DEPLOY AX SERVICES FROM CODE
Below is the script for automatically deploy
or undeploy AIF service.
In this example update the port with current company and deploy the service.
static void AIFservices(Args _args)
{
AifPort port;
AifPortName portName = "servicename";
AifPortManager::undeployPort(portName);
port = AifPort::find(portName,true);
if(port)
{
ttsBegin;
if(port.Company != curext() )
{
port.Company = curext();
port.update();
}
ttsCommit;
}
AifPortManager::deployPort(portName);
}
In this example update the port with current company and deploy the service.
static void AIFservices(Args _args)
{
AifPort port;
AifPortName portName = "servicename";
AifPortManager::undeployPort(portName);
port = AifPort::find(portName,true);
if(port)
{
ttsBegin;
if(port.Company != curext() )
{
port.Company = curext();
port.update();
}
ttsCommit;
}
AifPortManager::deployPort(portName);
}
No comments:
Post a Comment