Hi all,
In navision i modify code unit 64 Sales-Get Shipment. As my sales Invoice is also upadate with location code , exteernal document no and dimension 1 and 2.
this code is working properly in classic but when i go thorugh RTC page at that time is also working.
but issue is that every time i have to close that page i.e. sales Invoice Page or i have to refresh.
do any one know how can i solve this issue ?
:-k [-o<
0
Comments
What code did you write and are the other fields updated at first time only?
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
CreateInvLines(VAR SalesShptLine2 : Record "Sales Shipment Line")
// code for update invoice header ST** ZT-AB
SalesShptHeader1.RESET;
SalesShptHeader1.SETRANGE(SalesShptHeader1."No.",SalesShptLine2."Document No.");
IF SalesShptHeader1.FINDFIRST THEN BEGIN
IF SalesHeader."Location Code" = '' THEN
SalesHeader."Location Code" := SalesShptHeader1."Location Code";
SalesHeader.VALIDATE(SalesHeader."Location Code");
IF SalesHeader."Shortcut Dimension 1 Code" = '' THEN BEGIN
SalesHeader."Shortcut Dimension 1 Code" :='20';
SalesHeader.VALIDATE(SalesHeader."Shortcut Dimension 1 Code");
END;
IF SalesHeader."Shortcut Dimension 2 Code" = '' THEN BEGIN
SalesHeader."Shortcut Dimension 2 Code" :=SalesShptHeader1."Shortcut Dimension 2 Code";
SalesHeader.VALIDATE(SalesHeader."Shortcut Dimension 2 Code");
END;
IF SalesHeader."External Document No." = '' THEN
SalesHeader."External Document No." := SalesShptHeader1."External Document No." ;
IF SalesHeader."Currency Code" = '' THEN BEGIN
SalesHeader."Currency Code" := SalesShptHeader1."Currency Code";
SalesHeader.VALIDATE(SalesHeader."Currency Code");
END;
IF SalesHeader."Payment Terms Code" = '' THEN BEGIN
SalesHeader."Payment Terms Code" := SalesShptHeader1."Payment Terms Code";
SalesHeader.VALIDATE(SalesHeader."Payment Method Code");
END;
SalesHeader.MODIFY;
END;
// code for update invoice header EN** ZT-AB
WITH SalesShptLine2 DO BEGIN
SETFILTER("Qty. Shipped Not Invoiced",'<>0');
IF FINDSET THEN BEGIN
SalesLine.LOCKTABLE;
SalesLine.SETRANGE("Document Type",SalesHeader."Document Type");
SalesLine.SETRANGE("Document No.",SalesHeader."No.");
SalesLine."Document Type" := SalesHeader."Document Type";
Now when i use get shipment Line (For Sales) in Classic i.e. using Form
it is working in Sales Invoice Header, Shortcut Dimension 1 Code, Shortcut Dimension 2 Code, location code ...etc is update as i write in code.
but when i use same porcess in Pages. Sales Invoice Page is not Update.
alyways i have to press F5 (Refresh). so is there any other way so that my Sales Invoice Page automatic update.
so the difference is Copy Document is in Header level and Get Shipments is in Line level..
I will have a deep look into it and update you.
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
http://dynamicsuser.net/blogs/mark_brummel/archive/2009/12/16/tip-25-update-header-page-from-the-line-page.aspx
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
Thanks once again
=D>
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav
-Mohana
http://mohana-dynamicsnav.blogspot.in/
https://www.facebook.com/MohanaDynamicsNav