You need to sign in to do that
Don't have an account?
falfadli
Looking for how to properly use the Execute Anonymous feature in the IDE
Hi all,
easy question.....I have writtent the following web service...
global class UwCheckList {
webService static boolean getRegion(id opportunityId){
boolean oppExistInCw = false;
//query UW_CheckList Object to search for related opportunity
UW_Checklist__c aUW_Checklist = [Select Id, UW_Activity_Status__c from UW_checklist__c where Opportunity__c= :opportunityId LIMIT 1];
if(aUW_Checklist!=null) {//update status field
aUW_Checklist.UW_Activity_Status__c = 'Ready to Rate'; update aUW_Checklist;oppExistInCw = true;
return oppExistInCw;}
else {
return oppExistInCw;}
}
}
I was trying to find some simple example syntax that I could use in the Execute Anonymous area of the IDE to test htis out. Can anyone provide an example I could reference?
Thanks
you should be able to call it like this:
string OppID='xxxxx'; //insert your test id here Boolean Result = UwCheckList.getRegion(OppID); System.debug('\n\nREsult was '+Result);
All Answers
you should be able to call it like this:
string OppID='xxxxx'; //insert your test id here Boolean Result = UwCheckList.getRegion(OppID); System.debug('\n\nREsult was '+Result);
Thanks Jim!
Worked like a charm!