Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public List<Case> excase{get;set;}
- public String radioValue{get;set;}
- public Pagereference updateCase() {
- radioValue = apexpages.currentpage().getparameters().get('group');
- showtable=true;
- case cd = [select Id from Case where Id = : radioValue];
- cd.Last_Verified_by_User__c = UserInfo.getUserId();
- cd.Last_Verified_Date_Time__c = datetime.now();
- update cd;
- Pagereference ref = new PageReference('/' + cd.Id);
- return ref;
- }
- <apex:pageblockTable value="{!excase}" var="exscase" id="caselist" rendered="{!showtable}">
- <apex:column headervalue="Select Case">
- <input type="radio" name="group" value="{!exscase.Id}" />
- </apex:column>
- <apex:column value="{!exscase.CaseNumber}"/>
- <apex:column value="{!exscase.Status}"/>
- <apex:column value="{!exscase.Subject}"/>
- </apex:pageblockTable>
- @isTest
- static void testupdatecase(){
- Contact ct= new Contact (Firstname='test_firstname',LastName = 'test_lastname');
- CreateNewCase caseobject=new CreateNewCase(new ApexPages.StandardController (ct));
- insert ct;
- caseobject.showtable=true;
- caseobject.createCase();
- // struck here - caseobject.radioValue=[select id from case where contactid=:ct.id];
- PageReference resPg = caseobject.updateCase();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement