Hello All,
I have created code to load Custom Page. How i can add the await in Creatio Client Module function to read Object Data
Code Sample :
define("UsrCustomFunction", [], async functio(){
// API call Terrasoft.EntitySchemaQuery, to read the creatio table.
var getProcessData = function(){
var esq = Ext.create("Terrasoft.EntitySchemaQuery", {
rootSchemaName: "UsrGUMUProcessList"
});
esq.addColumn("Id");
esq.addColumn("UsrName");
return new Promise(function(resolve, reject) {
esq.getEntityCollection(function(response) {
if (response.success) {
resolve(response.collection);
} else {
reject(new Error("Failed to retrieve data: " + response.errorInfo.message));
}
}, this);
});
}
// [ Is it possible to add await or any other solution available for this? ]
var processData = await getProcessData();
//Process and return the Config based on the processData.
return {
viewConfigDiff: /**SCHEMA_VIEW_CONFIG_DIFF*/
};
});
Is this good solution to Create Custom Page in Creatio or any other solutions are available, then please assist me.
Regards,
Ajay K