Inserting a value thru C/AL Code

How can i insert a value into a field of a C/SIDE table dynamically through C/AL Code ? Can i view the same particular value on form ? Example:: I got two integer datatypes on form (salary, commission ) i want to view the total of this salary and commission automatically on the form after updating the same into the table field. with love venumal

I suppose there is another field in the table named “Total” or something similar. Why don’t insert you following code in OnValidate Trigger of salary and commission: “Total” := salary + commission; The Form showing this table should be updated immediate i think.

Dear Mr. Blum, Yes ur right another field is there in the table named as ‘total’.But the code u have written i have tried. I didn’t get what i need. With rgds. Venumala Raja sekhar

Hi What do you need then/instead?? Ben

If i understand you right you want to insert an new salary and commission and want immediately to know, how much salary and commission was done i a certain duration with the sepecific customer. Is that right ? If so you you create a flow-field like “grand total” in the table and tie it to the customer “total”-field. It should look for a customer and a certain duration and count all the totals. The actual result of this field should be shown in the form as soon as the record is saved.

Hi venumala, After you do the computation do you ahve a line to Modify the record or to insert the record in the table. Total := total + (sales * commission / 100); modify;

Try this Call this function from On validate Triggers of both sales and commission fiels. ShowTotal() Total := Sales + Commission; Modify; This should work Cheers Bobby

Dear bobby, Thank you. I got what i need. With love venumal