public static Set<String> getObjectItems(String objName){
Set<String> objItems = new Set<String>();
try {
// ① オブジェクトを指定してオブジェクトの情報を取得します。
Schema.SObjectType sObj = Schema.getGlobalDescribe().get(objName);
// ② 項目情報を取得するためにDescribeSObjectResult型に変換
Schema.DescribeSObjectResult sDesObj = sObj.getDescribe();
// ③ .fields.getMap()で引数の全項目を取得してMapに格納
// ④ Mapからfor文で中身を取り出していく
// System.debug('ラベル名 = ' + ss.getDescribe().getLabel());
//数式と更新更新可能の項目を取得
if(!ss.getDescribe().isCalculated() && ss.getDescribe().isUpdateable()){
objItems.add(ss.getDescribe().getName());
}
}
} catch (Exception e) {
throw new AuraHandledException(e.getMessage());
}
return objItems;
}