Hi mates! :)
I need your wisdom.
I'm trying to create a new field on table and page and the logic is the next one:
CustomAmount = new decimal field.
If currency factor = 0
then CustomAmount = currency factor
if currency factor <> 0
then CustomAmount = Amount/currency factor
I tried the next but didn't work. Any ideas?
Thank you so much :)
[Sorry for my bad english]
trigger OnOpenPage()
var
begin
if rec."Currency Factor" = 0
then
rec."CustomAmount" := rec.Amount;
if rec."Currency Factor" <> 0
then
rec."CustomAmount" := rec.Amount / rec."Currency Factor";
end;