cancel
Showing results for 
Search instead for 
Did you mean: 

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

mervz02
Explorer
0 Kudos
387

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]

Accepted Solutions (1)

Accepted Solutions (1)

SonTran
Active Contributor

Hi,

Try this query and assign to your FMS:

select datediff(day,$[$10.0.Date],$[$12.0.Date])

Hope this helps,

Son Tran

Answers (1)

Answers (1)

LoHa
Active Contributor
0 Kudos

Hi,

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