Lokup with change mandant

in a request form i want to perform a lookup to a table of another mandant. But wherever i add “CHANGECOMPANY” in a trigger of the request form button, i always get a view to the table of the current mandant. How can i make the system show the data from a different mandant ? Stefan Weinreich Billing Analyst

Hi Stefan! Maybe it will work if you perform the Lookup by code: e.g.


...
CLEAR(Form);
Record.CHANGECOMPANY([CompanyName]);
Form.SETTABLEVIEW(Record);
Form.RUNMODAL;
...

Regards, Jörg Joerg A. Stryk Apollo-Optik, IT/ERP

quote:


But wherever i add “CHANGECOMPANY” in a trigger of the request form button, i always get a view to the table of the current mandant.


note: (Mandant = company) This is in fact a problem we requested Navision to solve for 4 years now - but to no avail. If you are in company ‘A’, you can do a Customer.ChangeCompany (‘B’) but if you do a


Customer.Validate (Currency, 'EUR')

The Validate will read the currency table from company ‘A’. There is no possibility to set the company globally. You would have to rewrite every Validate and Lookup and passing the required Companyname as global Variable. Not a nice solution and requires a hell lot of coding in many places. ------- With best regards from Switzerland Marcus Fabian

eg. in Company X, to update the quantity in Sales Order in Company Y we faced the same problem recently. all the validation done when updating quantity in Sales Order Comany Y is done against the original company X. what we did was to do all the importing etc. from company Y, so that validation can be done against company Y. To rewrite all the validation code would be a lot of coding there… jordan

at first thanks to all. My problem is more simple than shown here. In a request form i have two controls. One shall provide a lookup to the customertable of the current company (let’s say company A), and the other control shall provide a lookup to the customer table of another company (let’s say company B). All i want to have is the possibility to see the customers of company B when i press the lookup-button in this control. What i did to solve this was entering a “CHANGECOMPANY” (and some more code) in the triggers OnActivate, OnLookUp, OnBeforeInput and into OnInputChange. But nothing helped. I always got a view to the Customertable of the current company (in this case company A). Any ideas how to catch the problem ? Stefan Weinreich Billing Analyst