Data Issue even when data per company = Yes

krvenkatakrvenkata Member Posts: 154
Hi

We have a weird issue with one of our client DB. The client is running on NAV 2009 R2 with SQL server 2008 R2. The client has 2 companies.
The issue is the Purchase Blanket order created in first company is being referred in second company when we try the open the Purchase blanket order form. Data per company = Yes for purchase header table.

The message that we get is that:

Purchase Blanket Order No:<1234> does not exist. The blanket order number given in that message belongs to first company.

It works fine in the first company. The issue is when we try to open the Purchase blanket order form in second company..

Anyone faced this kind of issue

Comments

  • mohana_cse06mohana_cse06 Member Posts: 5,504
    Is there any code in Form - OnOpenForm()? like CHANGECOMPANY?
  • David_SingletonDavid_Singleton Member Posts: 5,479
    krvenkata wrote:
    Hi

    We have a weird issue with one of our client DB. The client is running on NAV 2009 R2 with SQL server 2008 R2. The client has 2 companies.
    The issue is the Purchase Blanket order created in first company is being referred in second company when we try the open the Purchase blanket order form. Data per company = Yes for purchase header table.

    The message that we get is that:

    Purchase Blanket Order No:<1234> does not exist. The blanket order number given in that message belongs to first company.

    It works fine in the first company. The issue is when we try to open the Purchase blanket order form in second company..

    Anyone faced this kind of issue

    This is a known issue in Navision.

    What happens is you open a form in CompanyA and set a filter on a particular field (in this case the primary key)
    Then you open companyB and when you open that same form, the setigns from the other company are remembered so the filer is applied, and since a similar record does not exist, you get stuck

    You have four resolutions
    1/ Remove the zup settings by deleting the zup file or recompiling the form object.
    2/ You open the other company and go to the form and remove filters (assuming the order is still there)
    3/ You can put code in the onnextrecord of the form SETRANGE("no.") this you will see now in many Navision card forms.
    4/ You can go to the objct designer, to the appropriate table and insert the requested record, then open the form, remove filters and delete the dummy record.

    I hope this helps.
    David Singleton
  • David_SingletonDavid_Singleton Member Posts: 5,479
    By the way, in one of the early versions of Navision, they "fixed" this by creating a separate zup file for every company. But this became a nightmare to maintain, because say you had 5 companies, everyone of them had different settings for every form, so it was dropped.

    The better solution would be in the case of opening a form, if the form could not open it should pop up a message to ask to remove the filter and continue. But there were a lot of heated discussions back then and the decision was to simple add the SETRANGE code to the appropriate forms, which actually works pretty well.
    David Singleton
  • dansdans Member Posts: 148
    By the way, in one of the early versions of Navision, they "fixed" this by creating a separate zup file for every company. But this became a nightmare to maintain, because say you had 5 companies, everyone of them had different settings for every form, so it was dropped.

    The better solution would be in the case of opening a form, if the form could not open it should pop up a message to ask to remove the filter and continue. But there were a lot of heated discussions back then and the decision was to simple add the SETRANGE code to the appropriate forms, which actually works pretty well.

    Learned something new today. Thanks for history ! :thumbsup:
    Microsoft Certified IT Professional for Microsoft Dynamics NAV

    Just a happy frood who knows where his towel is
Sign In or Register to comment.