NAS work for multiple companies

kiyackiyac Member Posts: 118
NAS service and job queue are properly installed and set. Codeunit can be executed prefectly for company1 via NAS, however, it fails to run at company2. Notes, company1 and company2 are under the same db, with separately job queue set but pointing to same codeunit.

Enviornment 2009 SP1

NAS installation command :
"C:\Program Files\Microsoft Dynamics NAV\60\Application Server\nassql" appservername=abc, servername=abc, database=Testing, company=Company1, nettype=TCP, objectcache=8000, startupparameter="JOBQUEUE", installasservice

I have read from this web, that NAS can only run 1 company and following link teach how to enable NAS to support unlimited companies, http://www.mibuso.com/dlinfo.asp?FileID=924
however, I am not programmer and hesitate to just import the modified objects as it was written in year 2007, which may have version change in coding compare with 2009 SP1.

May I know how to deploy NAS to multiple companies?

Urgent, pls help.

Comments

  • ara3nara3n Member Posts: 9,256
    If you are on 2009. I suggest to use this solution.

    http://mibuso.com/blogs/ara3n/2009/01/2 ... companies/


    It uses NAS + web services and does not modify any existing objects. It's just a new codeunit that you need to publish as a webservice.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kiyackiyac Member Posts: 118
    thanks!

    here is the error log in job queue error log :

    a:Microsoft.Dynamics.Nav.Types.Exceptions.NavNCLChangeListenerConnectionFailedExceptionThe Microsoft Dynamics NAV Server cannot connect the Change Listener to SQL Server because of the following error: Cannot open database "Demo Database NAV (6-0)" request

    NAS service paramenter :
    "C:\Program Files\Microsoft Dynamics NAV\60\Application Server\nassql" appservername=abc, servername=abc, database=Testing, company=Company1, nettype=TCP, objectcache=8000, startupparameter="JOBQUEUE", installasservice

    So why system open database "Demo Database NAV (6-0)"? Note : I am not using standard db company for testing.

    Here is my job queue paramenter set in company1 and only one job queue is set
    Object Type to run : Codeunit
    Object ID to run : 50000
    Object Name to run : Run NAS WebService
    Parameter string : Company1,codeunit,50001

    Here is my job queue paramenter set in company2 and only one job queue is set
    Object Type to run : Codeunit
    Object ID to run : 50000
    Object Name to run : Run NAS WebService
    Parameter string : Company2,codeunit,50001

    Do I need to set another job queue for running codeunit 50001?

    The user ID set to run web service (service > properties > Log on tab) must be same as the user who run NAS?

    Thanks!
  • ara3nara3n Member Posts: 9,256
    Are you using the web service solution?
    If Yes, You need to change the customsettings.config in the service folder to point to the correct database.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kiyackiyac Member Posts: 118
    Correct db name is set in customsettings.config. Error fixed.

    Another error "Callback functions are not allowed" find in job queue error log.

    I have used classic and RTC client, but both get "Callback functions are not allowed", may I know what cause of this problem?
  • ara3nara3n Member Posts: 9,256
    I don't know why you are getting the error, that is why I wanted to see if it's the object you are calling that has the issue.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • kiyackiyac Member Posts: 118
    CU50001 is the object that I call for via CU50000.

    I have isolated web service involvement and find out :
    CU50001 work perfectly under environment NAS + job queue (which directly point to CU50001)

    Since CU50001 needs to carry out for multiple companies under same database and I just buy one NAS instance license only. Thus, web service introducted.
  • kiyackiyac Member Posts: 118
    CU50001 is the object that I call for via CU50000.

    I have isolated web service involvement and find out :
    CU50001 work perfectly under environment NAS + job queue (which directly point to CU50001)

    Since CU50001 needs to carry out for multiple companies under same database and I just buy one NAS instance license only. Thus, web service introducted.

    Besides, after CU50000 is run via web service + NAS + job queue, its status change to "In process", and can't auto reset to "Ready" after job is run, why?
Sign In or Register to comment.