CRm2016 On premises
Im having a brain freeze trying to update a record in a workflow. I have the ID of the record as a string , tried convering to guid but just get errors Unable to cast object of type 'System.Guid' to type 'Microsoft.Xrm.Sdk.EntityReference'.
Public Shared Function UpdateRecord(_recordid As string, service As IOrganizationService, context As CodeActivityContext) As Boolean
Try
Dim _updaterecord As Entity = New Entity("new_dbfmlivedata")
_updaterecord.Id = _recordid
_updaterecord.Attributes.Add("new_processing", True)
service.Update(_updaterecord)
Return True
Catch ex As Exception
Globals.clsGlobals.WrtietoErrorLog("UpdateRecord " & ex.Message.ToString)
Return False
End Try
Return False
End Function
*This post is locked for comments