Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error - Filter on a decimal value #876

Closed
vcqn11 opened this issue Feb 28, 2023 · 3 comments
Closed

Error - Filter on a decimal value #876

vcqn11 opened this issue Feb 28, 2023 · 3 comments
Assignees

Comments

@vcqn11
Copy link

vcqn11 commented Feb 28, 2023

I'm trying to filter records based on a decimal value. But adding a decimal (comma), results an error.


System.ServiceModel.FaultException<Microsoft.Xrm.Sdk.OrganizationServiceFault>:
An exception System.FormatException was thrown while trying to convert input value '[REDACTED]' to attribute 'opportunityproduct.exchangerate'. Expected type of attribute value: System.Decimal. Exception raised: Input string was not in a correct format.
FetchXML Builder

Server stack trace: 
- System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)
- System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)
- System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)
- System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

Exception rethrown at [0]: 
- Microsoft.Xrm.Tooling.Connector.CrmServiceClient.RetrieveMultiple(QueryBase query)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.RetrieveMultiple(QueryBase query)
- Rappen.XTB.FetchXmlBuilder.FetchXmlBuilder.<>c__DisplayClass121_0.<RetrieveMultiple>b__0(BackgroundWorker worker, DoWorkEventArgs eventargs)
- System.ComponentModel.BackgroundWorker.OnDoWork(DoWorkEventArgs e)
- System.ComponentModel.BackgroundWorker.WorkerThreadStart(Object argument)

<fetch>
  <entity name="opportunity">
    <filter>
      <condition attribute="opportunityid" operator="eq" value="ef2e8e0f-d6c0-4e90-bed0-3b20d6bd90a0" />
    </filter>
    <link-entity name="opportunityproduct" from="opportunityid" to="opportunityid" link-type="outer" alias="opt">
      <attribute name="exchangerate" />
      <attribute name="opportunityproductid" />
      <filter>
        <condition attribute="exchangerate" operator="ne" value="2,2" />
      </filter>
    </link-entity>
  </entity>
</fetch>

  • XrmToolBox Version: 1.2023.2.64
  • FetchXML Builder Version: 1.2022.11.2
  • DB Version: 9.2.23015.196
  • Deployment: Online
@rappen
Copy link
Owner

rappen commented Feb 28, 2023

Have you tried to use a point instead of a comma?
It may be related to local settings...

@vcqn11
Copy link
Author

vcqn11 commented Mar 1, 2023

Have you tried to use a point instead of a comma? It may be related to local settings...

Yes, it does not work:
image

Even if I were to execute this, the FetchXML displays it as value 2.

@rappen
Copy link
Owner

rappen commented Mar 1, 2023

That's. Good info. I'll go dig down and see what we can do.

@rappen rappen self-assigned this Aug 2, 2023
@rappen rappen closed this as completed in ba69276 Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants