Like the tittle said, how do i put a querry in a udf? Everytime i create a invoice, i would like that the document date would be 30 days prior to the current date. I already have a querry to do that btw