Options

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

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

Answers

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

    how can you change 'Your company' to the company name that you select on the page
  • Options
    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;
  • Options
    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
  • Options
    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

  • Options
    FMCFMC Member Posts: 12
    Answer ✓
    thanks I will give this a go
  • Options
    krikikriki Member, Moderator Posts: 9,096
    [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.