Search This Blog

Tuesday, November 24, 2015

How to identify the AOS server name /Instance Name In Axapta

Hi Folks,

Here is the code to identify the AOS server name /Instance Name In Axapta.

static void JobForAOSSeververInstantname(Args _args)
{
    xSession curSession;
    SysClientSessions clientSessions;
    SysServerSessions serverSessions;
    int usrSessionId;
    int serverId;
    str aosId;
    str instanceName;
    ;
    curSession = new xSession();
    usrSessionId = curSession.sessionId();
    select firstonly ServerId from clientSessions where clientSessions.SessionId == usrSessionId;
    serverId = clientSessions.ServerId;
    select firstonly * from serverSessions where serverSessions.ServerId == serverId;
    aosId = serverSessions.AOSId;
    instanceName = serverSessions.Instance_Name;
    info(instanceName);

}

Thanks,
Brahma

Monday, January 26, 2015

Error : Target file should be in UNC format – in batchprocess run in server ax2009

Hi Friends,

Error:  Target file should be in UNC format – in batch process run in server ax2009.

Normally we will get this error on batch process .I.e. when we run the report on screen and save the file in particular location /Email .The file will be saved in location with out any errors .

But when we do the same process on Batch .we will get this type of error.
Because in batch process, we will select the specific path to save the report, that particular path AOS Server couldn't able to identify the location.

That time we will get this type of error.

To solve this error, we need to create the folder in the location that location is accessible for all the users and as well as AOS Server also having the rights to access that path and run the bath again.
  

Thanks,
Happy Daxing …