1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public with sharing class AccountUrlRecordTypeIdController {
    @AuraEnabled
    public static string AccountRecordTypeId(String Type){
        return Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get(Type).getRecordTypeId();
    }
    
    // @AuraEnabled
    // public static RepairContactData RepairContact(String recordId){
    //     RepairContactData result = new RepairContactData();
    //     try {
    //         Account report = [select Department_Class_Label__c from Account where Id = :recordId];
    //         result.departmentClassLabel = report.Department_Class_Label__c;
    //         result.typeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContact').getRecordTypeId();
    //     } catch (Exception e) {
    //         throw new AuraHandledException(e.getMessage());
    //     }
    //     return result;
    // }
    public class RepairContactData{
        @AuraEnabled
        public string typeId;
        @AuraEnabled
        public string departmentClassLabel;
    }
}