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
Tarun KommuriTarun Kommuri 

Apex:2. Create a class to send Case Id, return Type

Apex:.    Create a class to send Case Id, return Type  

Hello Everyone

How to write apex class method .
Devi ChandrikaDevi Chandrika (Salesforce Developers) 
Hi tarun,

Try this code.kindly modify according to your requirement
public class caseType {
    public string caseTypeFromId(id caseId){
        case c = [select type,status,origin from case where id =:caseId];
        //system.debug(c.type);
        return c.type;
    }

}

Hope this helps you
Let me know if this helps you. Kindly mark it as solved so that it may help others in future.

Thanks and Regards