modify a temp record

karuchua
Member Posts: 151
is it possible to modify temporary records in a form?
0
Comments
-
Where did you fill the records'?0
-
from a report0
-
Changes made to temporary table are not stored in database.
what exactly is your requirement?0 -
am running a report which is generating temp records in a form,i nid to pass a variable to the form to modify one of the fields value and then save the new changes to the record0
-
Hello ...What you need to do is to find the record set which storing the values and you need to modify this record set only so that you are able to see your changes.0
-
i have found the record set but when i modify the field,but it doesn't save the changes to the record.0
-
Where are you checking for changes?
As I said the changes made to temporary table records are not saved in database..0 -
this is wot am doing with my code and highlighted is the field am modifying,how do i make it save the changes or wot do i need to do?
TempItemsREC.DELETEALL; LItemREC.RESET; LItemREC.COPYFILTERS(Item); LItemREC.SETFILTER("No.",'<>%1',''); IF LItemREC.FINDSET THEN BEGIN TotalFields := LItemREC.COUNT; REPEAT z := z + 1; [b][color=#FF0000]LItemREC."Suggested Disposal Price":=LItemREC."Unit Price"+((Gpernt/100)*LItemREC."Unit [/color][/b]Price"); Window.UPDATE(1,LItemREC."No."); Window.UPDATE(2,ROUND(z/(TotalFields)*10000,1)); LItemLedgEntriesREC.RESET; LItemLedgEntriesREC.SETCURRENTKEY("Item No.","Posting Date"); LItemLedgEntriesREC.SETRANGE("Item No.",LItemREC."No."); LItemLedgEntriesREC.SETRANGE("Posting Date",GMonthDates[2],WORKDATE); IF NOT LItemLedgEntriesREC.FIND('-') THEN BEGIN TempItemsREC := LItemREC; TempItemsREC.INSERT; END; UNTIL LItemREC.NEXT = 0; Window.CLOSE; END;
0 -
I can't understand from the code part why you use temporary records here and not directly modify the LItemREC table.
If you have to do like that then you can reverse the assignment from temp to normal table as:Rec := TempRec; IF NOT REC.INSERT THEN REC.MODIFY;
Ufuk Asci
Pargesoft0 -
LItemREC."Suggested Disposal Price":=LItemREC."Unit Price"+((Gpernt/100)*LItemREC."Unit Price");
You assign a value to LItemREC but not modify it. You copy it to a temporary and insert the temporary. So the modification is realised only in the temporary record.
This is why I said, you can reverse the assignment from temp to normal or do the modification directly on LItemREC table.Ufuk Asci
Pargesoft0
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