liangxiaozhen
2023-08-11 af908216bb0012fe849e3b49b3039c7ba238f8f0
force-app/main/default/classes/AgencyContractCloneController.cls
@@ -2,11 +2,11 @@
    @AuraEnabled
    public static InitData init(){
        InitData res  = new initData();
        ID myUserID = UserInfo.getUserId();
        id myUserID = UserInfo.getUserId();
        try {
            User userinfo = [SELECT Id,ProfileId FROM User WHERE Id = :myUserID LIMIT 1];
            res.Id = userinfo.Id;
            res.ProfileId = userinfo.ProfileId;
            User userinfo = [SELECT id,profileId FROM User WHERE id = :myUserID LIMIT 1];
            res.id = userinfo.id;
            res.profileId = userinfo.profileId;
        } catch (Exception e) {
            throw new AuraHandledException(e.getMessage());
        }
@@ -14,8 +14,8 @@
    }
    public class InitData{
        @AuraEnabled
        public string Id;
        public string id;
        @AuraEnabled
        public string ProfileId;
        public string profileId;
    }
}