Don't have an account?
Search for an answer or ask a question of the zone or Customer Support.
You need to sign in to do that
Sign in to start searching questions
Signup for a Developer Edition
Sign in to start a discussion
How to check field value starts with 'World***'
if(T1.WhatId == o.id && T1.Subject == 'Email: 'World.........'' ){
Street 9,
Try below :-
if(T1.WhatId == o.id && (T1.Subject).startsWith('World') ){
Tried not entering into if() condition!!
Will work aroud.
Not sure what is not working for you,the below code works for me:-
Task T1 = new Task(); T1.subject ='World is here'; if( (T1.Subject).startsWith('World') ){ system.debug('In if condition'); }
Your if condition: if(T1.WhatId == o.id && (T1.Subject).startsWith('World') )
It has an "AND" operator, so maybe your first condition there T1.WhatId isn't correctly met? Because otherwise I do not see why this shouldn't work.
check this http://www.salesforce.com/us/developer/docs/apexcode/Content/apex_methods_system_string.htm
Street 9,
Try below :-
Tried not entering into if() condition!!
Will work aroud.
Not sure what is not working for you,the below code works for me:-
Your if condition: if(T1.WhatId == o.id && (T1.Subject).startsWith('World') )
It has an "AND" operator, so maybe your first condition there T1.WhatId isn't correctly met? Because otherwise I do not see why this shouldn't work.