CHANGECOMPANY on lookup

FMCFMC Member Posts: 12
Hi,

Please can you tell me if it is possible to use the lookup to look at a page in another company

I have managed to a lookup on the page that I need to but not sure how to change to another company

Regards

FC

Best Answer

  • FMCFMC Member Posts: 12
    Answer ✓
    thanks I will give this a go

Answers

  • JohnHunterJohnHunter Member Posts: 45
    OnLookup
    YourRec.CHANGECOMPANY('YourComapny');
    IF PAGE.RUNMODAL(0,YourRec) = ACTION::LookupOK THEN
  • FMCFMC Member Posts: 12
    thanks for the reply,

    how can you change 'Your company' to the company name that you select on the page
  • JohnHunterJohnHunter Member Posts: 45
    IF PAGE.RUNMODAL(PAGE::Companies,Company) = ACTION::LookupOK THEN BEGIN
    YourCompany := Company.Name;
    YourRec.CHANGECOMPANY(YourCompany);
    IF PAGE.RUNMODAL(0,YourRec) = ACTION::LookupOK THEN;
    END;
  • FMCFMC Member Posts: 12
    this is the code that I've used,

    JPage.LOOKUPMODE(TRUE);
    IF NOT (JPage.RUNMODAL = ACTION::LookupOK) THEN
    EXIT(FALSE);

    its going to the right page but the company is not changing.

    I would like it to go to the company that I select from the page

    I hope this makes sense
  • JohnHunterJohnHunter Member Posts: 45
    IF PAGE.RUNMODAL(PAGE::Companies,Company) = ACTION::LookupOK THEN BEGIN
    -- opens companies page, if user selected a company then..
    YourCompany := Company.Name;
    -- gets company selected
    YourRec.CHANGECOMPANY(YourCompany);
    -- changes company for record

  • FMCFMC Member Posts: 12
    Answer ✓
    thanks I will give this a go
  • krikikriki Member, Moderator Posts: 9,115
    [Topic moved from 'NAV/Navision Classic Client' forum to 'NAV Three Tier' forum]

    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.