table reference error stating "Return type mismatch for then and else expressions. at line #, column ##

T

I am attempting to set the link between 2 tables, but I get the above error when I attempt to set the reference Id.

 

I have a button with the below:

let Customer := record(Customers,this.Id);
let newQuote := (create Quotes);
newQuote.Customer := Customer.Id; <---  This line throws the above error!
openRecord(newQuote.Id) 

I have no if/then/else statements. Why would I get this error?

Ninox Profile

Try this:

let me := this;
let newQuote := (create Quotes);
newQuote.(Customer := me);
openRecord(newQuote)

Steven

Reply