function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SvenSven 

Little help with test code

Hi,
 
I'am stuck on a few lines of code that i need to test but i don't know how to test this.
is there anybody that could point me out in the good direction. because i don't find much info on how to test your code before deployment.
 

public PageReference updateRMA() {
if (success == true){
if (handshake == true){
rma = [Select r.Status__c,r.Support_Request__c From
RMA__c r where r.Id = :rmaid];
rma.RMAid__c = callnr;
rma.
Name = callnr;
update rma;

sr = [Select c.Status from Case c where c.id = :rma.Support_Request__c];
sr.Status =
'Transferred';
update sr;
}
}
return null;
}

 

Thanks for your help

tmatthiesentmatthiesen
Take a look at the following link:

http://www.salesforce.com/us/developer/docs/pages/index_CSH.htm#pages_controller_error_handling.htm


SvenSven
Thanks for the link i will try that out.
didn't find that document, i was looking in the apex guide

Thx