Hi !
my requirement is to design a document page and call that page in sales line reference. When i entered the data in the sales order page then that data should moves into created page. I had tried this but i am getting only header information not the line data and here as follows that i had done. I called that page in sales line under Function Action and took a local function in Sales Order subform and written the code as
X.RESET;
X.INIT;
X.No := SalesHeader."No.";
X.INSERT(TRUE);
Y.RESET;
Y.INIT;
Y."No" := X.No;
Y."Line No" := SalesLine."Line No.";
Y.INSERT(TRUE);
Where X is created header and Y is created Line and i had X primary key as No and Y primary keys as No and Line No.
Thanks In Advance.
0
Answers
Must be Y."Document No." := X.No;
Yes i had taken that, but it shows the same output line information is passing in to my Line table only Document No field is filled and Line No field is not filled and also multiple lines are not allowing to take in Sales order and multiple lines are not passing in created line table.
I think that this is the same procedure as what you want to accomplish.
but the code i need to follow as
Y.RESET;
Y.SETRANGE("Document No.","Document No.");
Y.SETRANGE("Document Line No.","Line No.");
IF NOT Y.FINDLAST THEN BEGIN
Y."Document No." := "Document No.";
Y."Line No." := "Line No.";
END; is it correct or else need to change the code.
Ok thanks for the suggestion let me try this.
PlayListHeader.RESET;
PlayListHeader.SETRANGE(No,SalesHeader."No.");
PlayListHeader.INIT;
PlayListHeader.No := SalesHeader."No.";
PlayListHeader.INSERT;
ShowPlaylistInfo()
//GET("Document Type","Document No.","Line No.");
GetPlayListheader;
PlayListLine.RESET;
PlayListLine.SETRANGE("Playist No","Document No.");
PlayListLine.SETRANGE("Line No","Line No.");
PlayListLine.INIT;
PlayListLine."Playist No" := "Document No.";
PlayListLine."Line No" := "Line No.";
PlayListLine.INSERT;
This two are function which was taken in Sales Line table and taken a function in the sales subform as :
Playlist()
ShowPlaylistInfo;
and in the Action called this Playlist.
I think i am missing loop concept which useful to insert multiple line .
Can you please suggest me if i missed this.
Is it necessary as i am new to this.
When sales order filled with data then automatically Reference document page should be filled with sales order data.This is my requirement.
The primary key of the table 'Playlist Header' is the same as the 'Sales Header'. ( "No.")
The primary key of the table 'PlayList line' is the same as the 'Sales Line'. ("Document No.", "Line No.")
but why the data didn't flow from sales line and also not accepting multiple lines of data.
Did i miss anything or anything wrong in my code.
Suggest me if i miss anything.
Thanks in Advance...
The primary key should for example be: Document No. , Document Line No., Line No.
Try to look again to the function ShowItemChargeAssgnt.
Especially to the part:
In this part are the value's of the salesline copied to the ItemChargeAssgntSales. (In your case to the PlayList Line)
PlayListLine.RESET;
PlayListLine.SETRANGE("Playist No","Document No.");
PlayListLine.SETRANGE("Line No","Line No.");
IF NOT PlayListLine.FINDLAST THEN BEGIN
PlayListLine."Playist No" := "Document No.";
PlayListLine."Line No" := "Line No.";
End;
Where Document Line is a field in ItemChargeAssgntSales but in my case Line No
Add field PlayListLine."Document Line No."
Change primary key to "Playist No", "Document Line No.", "Line No"
Change code to PlayListLine."Document Line No" := "Line No.";
I think use the Repeat until concept to flow all the fields from sales line to PlayList Line.