- UPDATE u
- SET u.statecode = 'Lost', StatusCode = 'Out-Sold'
- from OPENQUERY(D365DEV,'SELECT * FROM opportunity where opportunityid = ''{{ID}}''' ) u
Response: OLE DB provider "MSDASQL" for linked server "D365DEV" returned message "[Devart][ODBC][Dynamics 365]This message can not be used to set the state of opportunity to lost. In order to set state of opportunity to lost, use the lost message instead.".
I have tried inserting into OpportunityClose but the opportunity remains Open and In Progress.
We are unable to write to these field on INSERT statements either.