While updating CRM record using alternate key from Web API which has unicode character in field data, It throws Bad request exception.
new_ANGLESector@odata.bind”: “/new_anglesectors(new_name=’Water Auth/Company’)”,
message”: “Bad Request – Error in query syntax.”, “type”: “Microsoft.OData.ODataException”, “stacktrace”: ” at Microsoft.OData.UriParser.ODataPathParser.ExtractSegmentIdentifierAndParenthesisExpression(String segmentText, String& identifier, String& parenthesisExpression)
Unicode characters in key value
If the data within a field that is used in an alternate key will contain one of the following characters
\\ then update or upsert (PATCH) actions will not work.
If you only need uniqueness then this approach will work, but if you need to use these keys as part of data integration.
We do have other limitations while using Alternate Key
Fields that can be used for alternate keys
Only these kinds of fields can be used to create alternate keys:
- Whole Number (Integer)
- Single line of Text (String)
- Date and Time
- Option Set
Number of keys
You can define up to five different keys for an entity.
Valid key size
When a key is created, the system validates that the key can be supported by the platform, including that the total key size does not violate SQL-based index constraints like 900 bytes per key and 16 columns per key. If the key size doesn’t meet the constraints, an error message will be displayed.
Hope this helps!