Hello.I need to sum a field real time, where Center No is M-150.I need to do it without flowfield.
I make this, but gives me only 0 as result.
Routing Line table -> new field -> Sum M-150 as decimal fieldRouting Line table -> new funcition -> SumTotal150Variables for this funcion -> RoutLine, datatype is record, subtype is Routing Line
RoutLine.RESET;RoutLine.SETCURRENTKEY("Routing No.", "Work Center No.");RoutLine.SETRANGE("Routing No.","Routing No.");RoutLine.SETRANGE("Work Center No.", 'M-100');RoutLine.CALCSUMS("Real Time");
Save this result.
I go to my new field Sum M-150 on validate() and place there name of the function like this -> SumTotal150;
Result is everything 0
Where do I make a mistake?
What Datatype is "Real Time". What version of Dynamics? and have you tried CALCFIELDS("Real Time" ) instead?
Depending of your NAV version the CALCSUMS only works if you on you key "Routing No.", "Work Center No.") - have added a SUM-field to the index.
You should take a look at the Customer table and one on of the flowfields and then the corresponding Customer Ledger Entry.The question you are asking is very basic, and you could take a look at the NAV 2013 Training material C/Side Introduction. It will speed up your learning curve dramatically.
Real Time is DecimalNavision 2009 R2Calcfields still not working
Could you paste 3 records into this message. Because you are doing something basically wrong and just to verify that you have the data correctly
my new field in Routing LineMy function in Routing LineField Sum M-100 OnValidate()
Thankyou for showing your code. But it is wrong in so many ways (sorry)1) Why do you create a SumTotal100 Function?2) What is the the purmose of the Sum M-100 field?3 You don't use the calculated "Real Time" field
It seems to me that you are very new at programming and you are missing some VERY important things about the C/AL Language. You REALLY NEED to participate in a training class or at least read the training material C/Side Introduction and C/Side Solution Development.
Try adding a line after your Routline.CALCSUMS("Real Time") - and see what happens.
I'm sure about that I'm newbie.I'm new at c/al. So I learn everyday something new.1) I was thinking about to create a function to sum this filtered field.2) My idea was to put there the function and store the value for the field in my table.3) I don't understand that.Thanks for the time, you are good man.
Sorry mate, you have to read the training material C/Side Introduction and C/Side Solution Development if not attending a training class! Currently you are not learning to code in C/AL - you're just punching some lines of code that you do not know how to work with. You can access material here at customersource or partnersource:https://mbs.microsoft.com/customersource/Global/NAV/learning/student-training-materials/course80436
Do you work for a Microsoft Partner or are you working as a freelance?