bkm
2 September 2022 02:35
1
Iām trying to get from Opportunities module where the sales_stage
is not equal to Closed Lost
or Closed Won
but I cant make it work. I read the docs but I cant figured out the correct syntax.
{{suitecrm.url}}/V8/module/Opportunities?filter[operator]=and&filter[sales_stage][neq]=Closed Won&filter[sales_stage][neq]=Closed Lost
Sometimes it only filtered the last condition, Hope someone can help me
1 Like
pgr
2 September 2022 09:03
2
Is this the same problem you have?
opened 09:59AM - 30 Aug 22 UTC
Type:Bug
Status:Fix Proposed
Priority:Important
Area: API
<!--- Please be aware that as of the 31st January 2022 we no longer support 7.10ā¦ .x.
New issues referring to 7.10.x will only be valid if applicable to 7.12.x and above.
If your issue is still applicable in 7.12.x, please create the issue following the template below -->
#### Issue
#### Expected Behavior
When using an OR more than once on the same field, you expect to get results that satisfy both filters.
For example: /V8/module/Accounts?filter[name][eq]=A&filter[operator]=or&filter[name][eq]=B
Should give all Accounts with name A or B.
#### Actual Behavior
When using this filter, we only get Accounts that satisfy the second filter. The first filter seems to be ignored.
When using an OR on two separate fields, the OR operator works as expected and gives results that satisfy both fitlers.
#### Possible Fix
n/a
#### Steps to Reproduce
1. Make sure there is an account called "A" and one called "B"
2. Try API V8 filter twice on same field: /V8/module/Accounts?filter[name][eq]=A&filter[operator]=or&filter[name][eq]=B
3. See that you only get Account "B", while account "A" is expected in the results as well.
#### Context
#### Your Environment
* SuiteCRM Version used: 7.12.6
* Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)):
* Environment name and version (e.g. MySQL, PHP 7): PHP 7.4, MariaDB 10.4
* Operating System and version (e.g Ubuntu 16.04): EL 8
bkm
3 September 2022 00:48
3
Yes, Iām experiencing the same issue