Forum Discussion

Marcus_Wolfe's avatar
Marcus_Wolfe
Experienced Cover User
5 years ago

LastModified and RowVersion don't change when Jobs and Accounts change

Can anyone recommend an approach to update a table of Jobs and Accounts, particularly the fields Job IsActive and Account CurrentBalance, without having to request Every Job and Every Account every time?

I tried to request only jobs and accounts which had a recent "LastModified" date, but have found that making a job Inactive does not constitute a Modification. Neither does a change in an Account CurrentBalance.

Neither of these changes changes the LastModified date, it also doesn't create a new RowVersion for the records. So I don't seem to be able to use RowVersion to compare two copies of a record to identify records that need to be updated in my table.

My current solution is to request All the jobs and All the accounts from the AccountRight file, then update All the fields in All the records in both tables. Exactly the same as what I would do if there were no such thing as RowVersion or LastModified field. Is that the best I can do?

  • Hi Marcus_Wolfe

     

    Thank you for reaching out, Just first up please ensure you have AccountRight 2020.3 installed as this has the latest updates for the Last-Modified Field - you can obtain the latest download link Here. 

     

    The Last-Modified Field will only update when a direct action is made against the invoice or endpoint you are using. Making the job inactive would not count as a direct action against the invoice/Endpoint or an account balance change as these are not happening directly on that endpoint. 

  • Hannah_B's avatar
    Hannah_B
    MYOB Moderator

    Hi Marcus_Wolfe

     

    Thank you for reaching out, Just first up please ensure you have AccountRight 2020.3 installed as this has the latest updates for the Last-Modified Field - you can obtain the latest download link Here. 

     

    The Last-Modified Field will only update when a direct action is made against the invoice or endpoint you are using. Making the job inactive would not count as a direct action against the invoice/Endpoint or an account balance change as these are not happening directly on that endpoint. 

    • Marcus_Wolfe's avatar
      Marcus_Wolfe
      Experienced Cover User

      Hi Hannah,

      thanks for the reply. The original post requested a recommendation for an improvement to my process so I suppose I'll assume that none is possible. This counts as a solution too, in fact it's the same as the solution to literally every other question I've asked about this API.

      In my opinion, the purpose of last modified dates and row versions is to reduce the size of data transfers and minimise handling for returned data. It is a poor implementation if I can't use them to maintain extremely basic data such as Job IsActive or Account CurrentBalance, and it causes my software to be much more slow, expensive and error prone than it should be. Further, I can't imagine an actual use for the LastModified field on the Accounts table if it can't be used to maintain current balance.

      Regards,

      Marcus Wolfe