You need to sign in to do that
Don't have an account?
rv90
Please help me on this.
Using IF statement with Contains
for (Task t: triggerNew) { If(t.callDisposition.contains('Disconnected')){ t.type = 'Invalid Contact Information'; } if(t.callDisposition.contains('Busy')){ t.type = 'No Answer'; } }Above is my code where i am trying to developer code where field callDisposition contains 'Disconnected' strings it should update the type as 'Invalid Contact Information' But what's happening is it is only seeing if the field has exact value (case sensitive) . I want if that field contains set of any string then IF statement should be true.
Please help me on this.
All Answers
Try this code
Do you mean that you callDisposition value might contain "disconnected" value or like any combinations like "disconneCted" ....."discOnnected"
If "disconnected" is the only other combination then,
Should do the trick
Hope it helps
RD