Options

Batch Control?

bbcaibbcai Member Posts: 80
When there is more than 1 person access the payment journal at the same time, is there any way to show the second and following users that the batch has already been modified by the other users and they are only allowed to read instead of modifying? Because for our site, the user to offset the payment with invoice is not same person. So they may concurrently access the same batch in payment journal. The error only show to second user when the users close the batch.

Comments

  • Options
    Luc_VanDyckLuc_VanDyck Member, Moderator, Administrator Posts: 3,633
    You could write some code in the OnOpenForm-trigger to lookup the userID and formID in a (new) table and display a message if another user has opened this form. You should write a record to this table whenever a user opens the form, and you should delete this record, whenever a user closes the form.

    It should be possible to manually remove a record, because eg. if your computer crashes, the record would still be in the table saying you have opened the form, but obviously you haven't.

    Hope this is somewhat clear.
    No support using PM or e-mail - Please use this forum. BC TechDays 2024: 13 & 14 June 2024, Antwerp (Belgium)
  • Options
    UrmasUrmas Member Posts: 76
    Been there, done that :wink:
    What I would suggest - do not write a siimple boolean value into the control table (eg form open / form closed) but instead use the time/date or datetime value. In this case you can add a code into OnTimer trigger of the payment journal to update the date/time after, say, each 5 minutes if the form is opened by the "first" user. Now if the second user tries to open the form and the code finds out that the datetime value is older than 8-10 minutes (clocks may be different) then it may assume that the Navision in first computer has been "closed by force" and take the control. It is recommended however that you use startup files or Windows time service to keep the clocks on the client computers synchronized.
    Using this approach you can build any "voting" mechanism - I use it in some places where some kind of bach jobs are to be maintained by client computers.
  • Options
    krikikriki Member, Moderator Posts: 9,090
    The best would be that each user has his own batch.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • Options
    bbcaibbcai Member Posts: 80
    Thanks all for your suggestion.

    Luc Van Dyck:
    If the features customised in payment and cash receipt journal. Will IT be busy checking the status of payment journal form is open or close?

    Urmas:
    How can we 'close by force' for the first user when the second user came in the same batch? Will it come to the case the first users haven't saved the changes and the second user came in and system 'close by force' the first user journal batch? If the first user have network problem during entry time, is this user able to come back to his own batch in a short time? Can the same user login in different PC and login to the same batch? Cause they may login for their clerk to key in the transactions.

    kriki:
    For our site here, there are 2 people to key in the same bank batch in payment Journal. We have different session to offset the invoices. So, is it possible to keep one person to one batch in this case?
  • Options
    krikikriki Member, Moderator Posts: 9,090
    It isn't a problem on the W1. I don't know if the version of your country has been changed in a way that this is not possible anymore. I know customers that use a batch per person to avoid this problem, so it is possible.
    Best try it out on a test-DB.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.