Button SQL Syntax

I am trying to add an OR or IN statement for a button on orders, but it doesnt seem to work. Do I need to do something special? 

It was order_Status = 'Draft' but i try to do order_Status in ('Draft','Rejected') or order_Status = 'Draft' order_Status =  'Rejected' neither work. 

Parents
  • 0

    Hi Anthony,

    Do you get anything reported in the ewareSQL log file when you use the non-working SQL?

    I've used both 'in' and 'or' statements on tab SQL filters without any issue, never on a button though.

    If nothing in the error log, try increasing your SQL logging in CRM to 'All queries over threshold' so you can see exactly what the where clause is being set to as that may answer your problem.

Reply
  • 0

    Hi Anthony,

    Do you get anything reported in the ewareSQL log file when you use the non-working SQL?

    I've used both 'in' and 'or' statements on tab SQL filters without any issue, never on a button though.

    If nothing in the error log, try increasing your SQL logging in CRM to 'All queries over threshold' so you can see exactly what the where clause is being set to as that may answer your problem.

Children
No Data