38 lines
1.8 KiB
OpenEdge ABL
38 lines
1.8 KiB
OpenEdge ABL
// changes
|
|
public with sharing class AutomationHandler {
|
|
@AuraEnabled
|
|
public static string getMetaData() {
|
|
|
|
String result;
|
|
try {
|
|
// // List<HIC_FilesME__Automation_Code__mdt> metaDataForAutomation = HIC_FilesME__Automation_Code__mdt.getAll().values();
|
|
// List<HIC_FilesME__Automation_Code__mdt> metaDataForAutomation = [SELECT Id, HIC_FilesME__Automation_Name__c, HIC_FilesME__Automation_Description__c, HIC_FilesME__Automation_Trigger_Code__c FROM HIC_FilesME__Automation_Code__mdt];
|
|
// /* for(HIC_FilesME__Automation_Code__mdt h : metaDataForAutomation){
|
|
// System.debug(h.Label);
|
|
// System.debug(h.hic_filemadeasy__Automation_Trigger_Code__c);
|
|
// } */
|
|
// // System.debug(metaDataForAutomation);
|
|
|
|
|
|
List<HIC_FilesME__Automation_Code__mdt> metaDataForAutomation = new List<HIC_FilesME__Automation_Code__mdt>();
|
|
if (Schema.sObjectType.HIC_FilesME__Automation_Code__mdt.isAccessible()) {
|
|
metaDataForAutomation =
|
|
[SELECT Id, HIC_FilesME__Automation_Name__c, HIC_FilesME__Automation_Description__c, HIC_FilesME__Automation_Trigger_Code__c
|
|
FROM HIC_FilesME__Automation_Code__mdt];
|
|
}
|
|
|
|
System.debug('metaDataForAutomation ' + metaDataForAutomation);
|
|
result = JSON.serialize(metaDataForAutomation);
|
|
|
|
} catch (Exception e) {
|
|
FME_Logger.error(e.getMessage(), 'AutomationHandler' + e.getLineNumber(), 'getMetaData');
|
|
|
|
result = JSON.serialize(new Map<String, String>{ 'error' => e.getMessage() });
|
|
// throw new AuraHandledException('bhvbfr');
|
|
}
|
|
finally{
|
|
FME_Logger.saveLog();
|
|
}
|
|
return result;
|
|
}
|
|
} |