Announcements
Hi all,
I'm unaware of the part calculation between two fields .
my requirement is
field 1 * field 2 = field 3 should calculate automatically.
And I need the procedure of the code using AL code.
Regards,
Thanks in Advance.
Hi,
sorry I am not getting your problem.
Thanks.
You can add the below logic on
trigger OnValidate of field 2
begin
Rec.Field3:=Rec.Field 1 * Rec.Field 2;
end;
But how are you going to fill the value in Field 1 and field 2 manually or you want to pull data from somewhere?
If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much
Manually ,
I want to enter the details manually in both the fields and that should automatically wants to get calculated and generated.
Field 1 + Field 2 = Field 3 (the field3 should get automatically as I manually enter the two fields ).
And need the Procedure of code in AL.
You can create a procedure as well.
But easiest way is to write the calculation logic in on the Triger that is OnValidate trigger of field 2
Rec.Field3:=Rec.Field 1 + Rec.Field 2; // Addition of both the field value will be set in field 3 when you assign some value in the field value 2.
Under review
Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 595 Super User 2026 Season 2
YUN ZHU 364 Super User 2026 Season 2
Grigorios Mavrogeorgis 331 Super User 2026 Season 2