Open Company from another company

navdynnavdyn Member Posts: 4
We have three companies in our DB. A new table which is datapercompany=No contains all contacts of all companies (key=company, contact no.) and is used to search over all contacts.

Now I'm searching for a contact in company A. If I find a contact in company B, I need to change the company (to B) and open the contact-form with the contact-no I just found.

Is there a possibility to open the contact-form direct from another company without using ctrl+o, and without opening the contact-form by hand?

I tried the feature "link to" but then another client started.

Who got good ideas???
NavFriend - Düsseldorf

Comments

  • alwaysgunaalwaysguna Member Posts: 45
    You can insert all the values of the contact in other company into a temporary recordset of contact and then display the same in contact form.

    But that is only temporary you cant do any modifications to that.

    Regards,
    Guna
    Guna
  • navdynnavdyn Member Posts: 4
    alwaysguna wrote:
    You can insert all the values of the contact in other company into a temporary recordset of contact and then display the same in contact form.

    But that is only temporary you cant do any modifications to that.

    Regards,
    Guna

    No, I really need to change the company because on the contact-form changes have to be done for the contact and although for other tables referring to that contact.

    But Thanks Guna
    NavFriend - Düsseldorf
  • DenSterDenSter Member Posts: 8,304
    It is unfortunately not possible to do what you are asking. It is not possible to "open another company while in one company". It is possible to look at and modify data from other companies, and that will take custom development, probably fairly extensive too.

    Loading a temp record and open the regular contact form would be one way to look at the data, and writing things back would require custom development.
  • wirowiro Member Posts: 92
    Hi all

    Perhaps you can use CHANGECOMPANY(company name), use buffer table and customize the form.
  • David_SingletonDavid_Singleton Member Posts: 5,479
    navdyn wrote:
    We have three companies in our DB. A new table which is datapercompany=No contains all contacts of all companies (key=company, contact no.) and is used to search over all contacts.

    Now I'm searching for a contact in company A. If I find a contact in company B, I need to change the company (to B) and open the contact-form with the contact-no I just found.

    Is there a possibility to open the contact-form direct from another company without using ctrl+o, and without opening the contact-form by hand?

    I tried the feature "link to" but then another client started.

    Who got good ideas???

    Yes this is very simple. One mod I do for every Multi company implementation I do.

    Create a copy of the customer card. :=
    Add a new function 
    ChangeCompany(Comp::Text30)
    NewCompany := Comp;
    
    Then in OnOpen Triggger add
    If NewCompany <> '' then
      CHANGECOMPANY(NewCompany);
    

    Now just call the function to set the company, then use RunModal to open the form. It will now be working in the new company.

    PS Navision's multi company functionality is very powerful, you just need to work with it.

    For one client I set it up like this that they could go to an IinterCompany transaction, and use Navigate to see where the transaction posted across all companies, and on the drill down (Show) it would open (e.g.) the Posted Sales Invoice in the other company.

    I agree it could be better, but in fact NAV inter company is pretty damn good.
    David Singleton
  • David_SingletonDavid_Singleton Member Posts: 5,479
    Oh and a couple of notes:
    Main Company = the company you are in when you start
    Sister company is the company that you need to see details from


    When you CHANGECOMPANY in a form, to the sister co. basically everything in the scope of that form also changes to the sister company. BUT once you leave the form, you go back to the Main company.

    So if for example you Use the Item Card, (the one I do this the most for), the the flow fields will all point to the sister company, which is good, but if you drill down, you then are opening a new form which is the main company.

    BUT if you have a sub form, then that sub form is in the scope of the form so it shows records also from the Sister company.

    So although you can use these forms to edit data (I never recommend insert or delete), you need to be certain there is no validation int he sister that goes out side the form other wise it will validate on the Main company.

    Also ALWAYS add a field to the top of every form you modify with source expression COMPANYNAME. It can get damn confusing when users are switching between companies.
    David Singleton
Sign In or Register to comment.