Once again about LOCKTABLE

GavrilaGavrila Member Posts: 12
Hello,

How I can lock the record in Nav SQL db on opening form, i.e. I want to lock only one current record, but not set of records.
I did't find anwers on my question in previous posts.
If i used REC.LOCKTABLE in OnAfterGetCurrRecord trigger i get error message.

Comments

  • bbrownbbrown Member Posts: 3,268
    You will likely find lots of ideas that get you part way there, but not a complete solution. This is one of those features that would need to be considered in the basic systems design. Particularly in the way NAV retrieves and updates data.
    There are no bugs - only undocumented features.
  • kinekine Member Posts: 12,562
    I strongly not recommend to lock any record when opening form if you want to keep the lock during the form is opened.

    1) It cannot be done, because the locks are released after triggers are finished (implicit commit)
    2) If it is done, you will have serious performance problems in all connected areas
    Kamil Sacek
    MVP - Dynamics NAV
    My BLOG
    NAVERTICA a.s.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    The question here, is "Why did you buy Navision, when in fact all you want is a new system that emulates your old system?" Just go back to your old system if you were happy with it.
    David Singleton
  • ajhvdbajhvdb Member Posts: 672
    The question here, is "Why did you buy Navision, when in fact all you want is a new system that emulates your old system?" Just go back to your old system if you were happy with it.

    LOL, do you say this to all your customers while going live with there new NAV implementation :)
  • David_SingletonDavid_Singleton Member Posts: 5,479
    ajhvdb wrote:
    The question here, is "Why did you buy Navision, when in fact all you want is a new system that emulates your old system?" Just go back to your old system if you were happy with it.

    LOL, do you say this to all your customers while going live with there new NAV implementation :)

    Yes absolutely. :shock:

    As soon as a client starts saying "well we need it to do it like this" or "In our old system we entered the data in a window like this", or basically any sentence that is about to lead to the phrase "in our old system we..." then I allways ask them why they bought Navision.

    If people are changing systems, then its critical to break them free of the old ways as soon as possible. And as a consultant it is your job to bring out the whip.

    Read more in my blog The most powerful tool that a Dynamics NAV consultant can use

    When a see a need to do something completely different to Navision (i.e. to block all access to a table whilst someone is using the form) it indicates that most likely the client has asked for something silly that the consultant has said "Yes sure we can do that" OR that their partner has designed something wrongly and gotten them selves in a hole they now need to dig out of.
    David Singleton
  • ajhvdbajhvdb Member Posts: 672
    Well, let me add some smilies too :shock: :shock: :shock:

    Yes, you can and must explain the way NAV works and just say no... when needed. But your sentence isn't a good first starting line :oops:

    My starting line is "Well work with it first and put it on your todo/wishlist. After a few months working in NAV you can decide if you still want to change it.". It's a good way of preventing major changes.

    So, I think we agree on this. :D
  • GavrilaGavrila Member Posts: 12
    Thanks to all for reply.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    ajhvdb wrote:
    ...My starting line is "Well work with it first and put it on your todo/wishlist. After a few months working in NAV you can decide if you still want to change it.". ...

    I used to also do it that way, but found it not to be very effective. The shock value of making a client realize why he just spent all this money works far more effectively.

    Are you are partner? Does your company sell Navision? If so then I understand that in many situations you risk losing a sale, or at least upsetting revenue streams by doing it this way. I have the advantage that I don't sell Navision, so I am allowed to be honest. 8)
    David Singleton
  • DenSterDenSter Member Posts: 8,304
    What I've seen is that during the process of selling NAV, everything is made to look easy, and when the customer hints at making NAV work like their old system, the selling partner usually doesn't say anything about it and it deosn't go any further than "you can modify NAV to fit your business process", ignoring the fact that making one system behave like another has nothing to do with business process, and really setting the wrong expectations.

    When you get into a situation where this has all gone terribly wrong, a stronger approach is often necessary. At that time there's already a lot of custom code to modify standard NAV processes, you can be blunt and a question such as "if you made NAV behave like your old system, why did you even purchase it?" is much more appropriate. In fact, bluntness is often even expected in this situation :mrgreen:
  • idiotidiot Member Posts: 651
    I know a few Nav partners whose slogan is "We make Nav look & work like your old system.", without this slogan they would not be able to achieve any sales & they target these niche group. It's also thanks to this slogan that Nav is reaching critical mess, i mean mass...

    From customer's perspective, basically there's nothing wrong with the legacy system. The reason for the change is probably from auditors' advise so that auditing fees will not keep increasing as auditors' jobs did not get more hectic.
    So if the recommended system can "look & work" like the legacy system & fit's the auditors' requirements, the rest is history...(it is highly probable the cake is shared...)

    Another issue is many customer IT do not have development or ERP knowledge (permanent active connection, sessions, data growth, web-enability, etc) & many non-selling points of Nav often surface after the $ had been paid...

    I have personally seen these kind of "one-off" sales where the system becomes not upgradable. After implementation the customer-vendor relationship is over.
    NAV - Norton Anti Virus

    ERP Consultant (not just Navision) & Navision challenger
Sign In or Register to comment.