Forum Discussion

Nigel_White's avatar
Nigel_White
Experienced Cover User
3 years ago

Company File ID changes on every update

My client uses AccountRight on Premises. Every time the product updates, the Company File ID changes, breaking all the Apps I have developed. I need to then go in and re-code all the Apps to point at the new Company File ID. Any one else seen this, know a work-a-round?

  • You can use the Company Files endpoint in the API to return a list of files and let them select the one they want. This will give you the new Company file ID.

    Perhaps if there is only one file returned by this endpoint, your code could automatically select it although they will still need to log on.

    Alternatively, if practicable, put their company file in the cloud as I believe the Company file ID does not change for cloud files.

    • Nigel_White's avatar
      Nigel_White
      Experienced Cover User

      Hi John, Thank you for your reply. I have an automated process that extracts data from MYOB without user intervention, so this would not be practical. There doesn't seem to be any other field on the comapny file list that is unique and unchanging. It must be an On Premises oversight, as you are right, I don't have any issues with cloud clients.

      • kjm's avatar
        kjm
        Trusted Cover User

        Nigel_White I have the same issue. We use a network implementation. I have stopped using the myob file id and instead use only the name of the file but we only have a small number of known files that we use internally

         

        what's the "automated process"? is it a program you have coded using the API? or script? I have a series of batch jobs that run that I have written in c# using Hangfire jobs engine

         

        Maybe you could write some code that detects when the file is no longer there and allow some access to choose a company file using the company end point..not really a rgeat solution but cvan't think how you would solve it without some user intervention unless you had some sort of control of te naming of the file...for example suffix with a unique code of some kind if the client would allow it and then you could just search for it