Hello!
A question. I want to fill a column in a table with a default value. I can do this in many ways, but normally in SQL I can do something like this:
ALTER TABLE MijnTabel ADD CONSTRAINT DF_xxx DEFAULT GETDATE() FOR MijnKolom
Something like this. I wanted to do the same thing within the SF, but it seems that is not possible. What I did was go to the table and then fill in 'GetDate()’ as the default for that column. However, then I get a message during deployment that there was a problem converting the varchar to a date. In short, it sees 'GetDate()’ not as a function, but as a string (the single quotes were added too).
Long story short: is it possible to use GetDate() as a default from within the SF, or should I use another method (f.i. create a default that automatically fills this field with the current date)
BTW: there is a slight difference between these two: if I were to use GetDate() as the default, it would get the date when the record was added. If I create my own default, it would get the date the form was shown to the user. But that is not really a problem here.