Showing results for 
Search instead for 
Did you mean: 

Why my User Defined Field does not refresh when other field changes

0 Kudos

Hi Experts i create a UDF and a Query which compute number of days between two date using DATEDIFF and i want to show it to UDF Field, i setup it using FMS when AR Invoice due date field is change it will automatically compute to the UDF field the total Difference of my Posting Date and Due Date, but apparently it does not refresh at all. here is a sample of my code.

DATEDIFF(DAY,U_CounterDate,T0.DocDate + 10 ) FROM OINV T0 WHERE T0.[DocNum] = $[OINV.DocNum]
View Entire Topic
Active Contributor
0 Kudos


what is not working your querie or the trigger?
For the query you can try this

SELECT DATEDIFF(DAY,$[$U_CounterDate.0.0],$[$10.0.0] + 10 )

If you want to test it.
Save the query, open the invoice window and then go through the menu to the query. The variables will be filled with the values from the form.

FMS Test.png

you could post a picture of your settings if it don't work....
Ah and at least, where is the UDF you are looking in with your query and where is the UDF that should be filled?

regards Lothar