Error with SETVIEW using a sortering key

I’m having a strange error. Based on the other threads I have found, then I it might be related to the captions vs. fieldnames, but I just cannot figure out why.

My sortkey is: “Contact Company No.,Date,Contact No.,Closed” on the “To-Do” table.

This is inserted into a condition string like:

“SORTING(Contact Company No.,Date,Contact No.,Closed) WHERE (Opportunity No.=FILTER(00001))”

And when setting this string into the SETVIEW(string) then I’m getting this error:

“The To-do table does not have an active key that starts with the following field or fields: Contact Company No.,Date Closed,Contact No.,Closed.”

Exactly how did “Date” become “Date Closed”?

I just tried to change the field caption of the “Date Closed” field to “1Date Closed”.

That instead resulted in this error:

"A ‘)’ is missing in TableView.
SORTING(Contact Company No.,Date,Contact No.,Closed) WHERE(Opportunity No.=FILTER(00001))"

So it seams like NAV somehow want to replace the “Date” field in the sorting string with the Caption of the Date Closed field.