Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
global with sharing class AssessCustomerStatus {
public static List<Results> GetStatus (List<Requests> requests)
//this operates off the current User
Id userId = UserInfo.getUserId();
User curUser = [select name, RevenueTier__c, contactid, contact.accountid from user where id = :userid];
Integer severeCaseCount = [SELECT COUNT()
FROM Case, Case.Contact
WHERE Contact.Name = AND Priority = 'High'
Results curResult = new Results();
curResult.severeCaseCount = severeCaseCount;
curResult.revenueTier = curUser.RevenueTier__c;
List<Results> resultsList = new List<results>();
return resultsList;
global class Requests {
global String curUserId;
global class Results {
global Integer severeCaseCount;
global Decimal revenueTier;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment