cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
raoraheel
Helper II
Helper II

Filtering by Sales Order Status from D365 Table

How can I go about extracting only orders that have not been invoiced? Extracting all data is not working due to large number of orders and i'm seeing there is a limit of 10k records.

 

I've tried these but none seem to have worked. Any suggestions will be appreciated. Thanks

 

ne 3

ne '3'

ne 'Invoiced' 

 

One of the error is : An error has occurred. A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.DataEntities.SalesStatus' and 'Edm.String' for operator kind 'NotEqual'.

 

 

P2.jpg

 

2 ACCEPTED SOLUTIONS

Accepted Solutions
krootz
Solution Supplier
Solution Supplier

@raoraheel  can you try this?

CustomerGroupID eq 'DIRECT' and SalesOrderStatus ne Microsoft.Dyanmics.DataEntities.SalesStatus'Invoiced'

View solution in original post

abm
Super User
Super User

Hi @raoraheel 

 

@krootz  suggestion there was a typo in Dynamics spelling. 

 

image.png

 

Try using the correct spelling and see if that works.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials

View solution in original post

9 REPLIES 9
krootz
Solution Supplier
Solution Supplier

@raoraheel  can you try this?

CustomerGroupID eq 'DIRECT' and SalesOrderStatus ne Microsoft.Dyanmics.DataEntities.SalesStatus'Invoiced'

raoraheel
Helper II
Helper II

@krootz that didn't work. Getting this error when I do that.

 

An error has occurred. The string 'Microsoft.Dyanmics.DataEntities.SalesStatus'Invoiced'' is not a valid enumeration type constant.
clientRequestId: 57982152-3717-4a38-8e1e-14c3f7e04ba7

@raoraheel  sorry I assumed it was an enum. Is that a lookup?

 

An error has occurred. A binary operator with incompatible types was detected. Found operand types 'Microsoft.Dynamics.DataEntities.SalesStatus' and 'Edm.String' for operator kind 'NotEqual'.

So I'm not sure. 

raoraheel
Helper II
Helper II

@krootz it is an enum. This is how my unfiltered data is being extracted right now that i'm trying to limit.

 

"IsSalesProcessingStopped":"No","SalesOrderStatus":"Invoiced","CustomerGroupId":"Direct" 

 

abm
Super User
Super User

Hi @raoraheel 

 

@krootz  suggestion there was a typo in Dynamics spelling. 

 

image.png

 

Try using the correct spelling and see if that works.

 

Thanks



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
abm
Super User
Super User

Is it  SalesOrderStatus or SalesStatus? Make sure you using the correct field name as well.



Did I answer your question? Mark my post as a solution!

If you liked my response, please consider giving it a thumbs up


Proud to be a Flownaut!

Learn more from my blog
Power Automate Video Tutorials
krootz
Solution Supplier
Solution Supplier

@abm good catch! I didn't even notice. 😅

raoraheel
Helper II
Helper II

@krootz @abm i tried all possible combinations already to see if something might works lol

the entity has it SalesOrderStatus so tried that too.

raoraheel
Helper II
Helper II

@krootz @abm fixing the typo worked!!! thanks both of you!!!

Helpful resources

Announcements
Power Automate News & Announcements

Power Automate News & Announcements

Keep up to date with current events and community announcements in the Power Automate community.

Community Calls Conversations

Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Automate Community Blog

Power Automate Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (4,014)