field update in RTC page

Amolkbhad23
Member Posts: 46
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<
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
-
i am using NAV 2009 R2.0
-
Amolkbhad23 wrote:Hi all,
In navision i modify code unit 64 Sales-Get Shipment. As my code 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 -
Cant you wait?
What code did you write and are the other fields updated at first time only?0 -
sir, below code i write in CU 64
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.0 -
Did you check Copy Document function? this has the option to update the header also..
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.0 -
thanks my issue is resloved..
Thanks once again
=D>0 -
Amolkbhad23 wrote:thanks my issue is resloved..
Thanks once again
=D>0 -
Are there other ways to do this? The tip looks good but it seams so strange they don't have a update statement for this..0
-
Yes its strange, because in classic we will be calling subform function from Main form itself..but in rtc pages the action is completely shifted to Subpage..there will not be any link to main Page..0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.6K Microsoft Dynamics NAV
- 18.7K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 320 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions