I am looking for a way to write data to a flow field. I am creating a process only report that updates a flow field. The problem is that after the report runs the flow field is not changed. I have stepped through the code as the report runs. I can see the flowfield value change but as the report loops through the data item the value changes back to zero. I have tried a modify, insert and commit after updating the field and nothing seems to change. Does anyone know if it is even possible to write data to a flow field in code? If it is possible then how?
0
Answers
If you want to be able to update the field, then either make a new field or change the field to not be a flowfield.
Or, change the underlying formula.
So if the flowfield is say the customer name, based on the customer number, and it looks up to the customer table, then you cant change the flowfield, but if you go GET the customer record, and update the Name field, then your flowfield will change. Of course it will also change for every other flowfield that looks up to the name...
Maybe you should post more of what you are trying to do.
-a
awarn and others : it is possible to write data to the DB through a flowfield, but only few people know this obscure feature. And it is easily forgotten. Just a few days ago, a collegue reminded me of the feature. :oops:
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!
So if you make the customer balance editable, and the customer balance is 0, and you enter 25 into the field, Navision will write a Customer Ledger Entry for the "missing" 25.
RIS Plus, LLC
RIS Plus, LLC
This functionality is a good example of standard Navision. You can make a Job planning and create entry records by modifying data in a matrix.
in my opinion it is not possible do that by C/AL. You will need to insert the entry in standard way through the C/AL. This behavior is only for entering the data through visual components...
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.
The design of the report is as follows: I created a process only report that has two data items. The first being the Resource and the second being the Date. In the date data item is the logic for finding the period name and date. after determining that I have a case statement
CASE "Period Name" OF
'Monday':
BEGIN
CompanySchedule.CALCFIELDS("Mon Avail Hrs");
CompanySchedule.VALIDATE("Mon Avail Hrs",DailyHours[1]);
END;
'Tuesday':
......
The DailyHours[1] is coming from the options tab of the request form of the report. With this report I am creating a capcity for the resource on a daily basis. I am able to populate 8 hours per day for an entire year in about 8 seconds.
MVP - Dynamics NAV
My BLOG
NAVERTICA a.s.