public with sharing class NewAgencyContractController {
|
|
@AuraEnabled
|
public static UserResult UserInfo_Owner() {
|
UserResult result = new UserResult();
|
ID myUserID = UserInfo.getUserId();
|
try {
|
User tempUser = [select Id,ProfileId from user where id = : myUserID ];
|
result.id = tempUser.Id;
|
result.RecordTypeId = Schema.SObjectType.Account.getRecordTypeInfosByDeveloperName().get('AgencyContract').getRecordTypeId();
|
result.ProfileId = tempUser.ProfileId;
|
} catch (exception e) {
|
result.result = e.getMessage();
|
}
|
return result;
|
}
|
|
public class UserResult {
|
@AuraEnabled
|
public string result;
|
public UserResult( ) {
|
result = 'Success';
|
}
|
@AuraEnabled
|
public string id;
|
@AuraEnabled
|
public String RecordTypeId;
|
@AuraEnabled
|
public string ProfileId;
|
}
|
}
|