Home
> Power Platform > Xrm.Data.Powershell | Get-CrmRecordsByFetch | White space is not allowed before the string terminator.PowerShell
Xrm.Data.Powershell | Get-CrmRecordsByFetch | White space is not allowed before the string terminator.PowerShell
While executing Get-CrmRecordsByFetch operation in PowerShell using Microsoft.Xrm.Data.PowerShell library, I encountered
White space is not allowed before the string terminator.PowerShell error.
Reason:
- Issue was with the format of ‘FetchXML’ being passed to Get-CrmRecordsByFetch operation.
- There should not be a space before closure “@ tag.
- Following does not work as there is space before the closure “@ tag of $fetch variable.
Fix:
- Fix is simple, remove the space before the “@ tag of $fetch variable.
- Following works.
Sharing this trivial Issue as it was annoying and took sometime to fix 🙂
Categories: Power Platform
Get-CrmRecordsByFetch, Xrm.Data.Powershell
Comments (0)
Trackbacks (0)
Leave a comment
Trackback