String to get a record

amangamang Member Posts: 14
edited 2009-05-23 in Navision Financials
Hi,

is it possible to get a record with a string of pk-values?

something like this:

string: 'Quote,1002'
SalesHeader.GET(string);

This does not work, because "can´t convert string into option" (error). Is there any solution for this? (recref does not exist in 2.60...)

thanks!

Comments

  • garakgarak Member Posts: 3,263
    Are you really under Financials (2.00 - 2.60) or in a later version?
    In the later Version take a look on Rec.GetPosition() / Rec.SetPosition()
    Do you make it right, it works too!
  • krikikriki Member, Moderator Posts: 9,115
    garak wrote:
    Are you really under Financials (2.00 - 2.60) or in a later version?
    In the later Version take a look on Rec.GetPosition() / Rec.SetPosition()
    And if you are, I would recommend (at least) a technical upgrade to be able to use GETPOSITION/SETPOSITION.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • byllebylle Member Posts: 47
    If you really have to do it under Financials (2.60) - then your only possiblity is to use filters.

    Split you string into 2 - one for "Document Type" and one for "No.", and then use them in the following way:
      string1 := 'Quote'; string2 := '1002'; SalesHeader.setfilter("Document Type",string1); SalesHeader.setfilter("No.",string2); SalesHeader.FIND('-');

    In this way you don't have to convert the option field.

    As garak & kriki allready has mentioned - in this version you are not able to use GETPOSITION/SETPOSITION.
    Therefore your only way is to use filters.
Sign In or Register to comment.