You are right about the line where the code fails. However, when I try to use your suggestion I'm getting error on the same line with
Message Block This is a demo Plugin Start from Ankur : Create
IsPriceOverwriddenMicrosoft.Xrm.Sdk.Money
end IsPriceOverwridden
priceperunit
end priceperunit
quantity
end quantity
ExceptionSystem.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue (Fault Detail is equal to Exception details:
ErrorCode: 0x80040203
Message: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue
TimeStamp: 2018-10-05T15:20:05.0395462Z
OriginalException: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue (Fault Detail is equal to Exception details:
ErrorCode: 0x80040203
Message: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue
TimeStamp: 2018-10-05T15:20:05.0395462Z
--
Exception details:
ErrorCode: 0x80040203
Message: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue
TimeStamp: 201...).
This is a demo Plugin end from Ankur Message Block-Trace text from the plug-in.
This is a demo Plugin Start from Ankur : Create
IsPriceOverwriddenMicrosoft.Xrm.Sdk.Money
end IsPriceOverwridden
priceperunit
end priceperunit
quantity
end quantity
ExceptionSystem.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue (Fault Detail is equal to Exception details:
ErrorCode: 0x80040203
Message: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue
TimeStamp: 2018-10-05T15:20:05.0395462Z
OriginalException: System.ServiceModel.FaultException`1[Microsoft.Xrm.Sdk.OrganizationServiceFault]: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue (Fault Detail is equal to Exception details:
ErrorCode: 0x80040203
Message: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue
TimeStamp: 2018-10-05T15:20:05.0395462Z
--
Exception details:
ErrorCode: 0x80040203
Message: Type Mismatch: Type of Attribute: InvoiceDetail.isproductoverridden is: System.Boolean. However, Type of passed-in value is: Microsoft.Xrm.Sdk.OptionSetValue
TimeStamp: 201...).
This is a demo Plugin end from Ankur