/** * check-governor.apex */String result ='';result +='\n';result +='\n';// 引数を自由に変えて Maximum CPU time を確認result +=CaseDemo.countLoop(0,2000000);result +='\n';System.debug('\n==================================================');System.debug(result);System.debug('\n==================================================');
exportdefaultasyncfunction (event, context, logger) {// const result = 'Hello, World!!';// let result = event.data.numStart;// while (result < event.data.numEnd) {// result++;// }constresult=awaitcontext.org.dataApi.query('SELECT Id, Name FROM Account' );return result;}
exportdefaultasyncfunction (event, context, logger) {// const result = 'Hello, World!!';// let result = event.data.numStart;// while (result < event.data.numEnd) {// result++;// }constuow=context.org.dataApi.newUnitOfWork();constreferenceId=awaituow.registerCreate({ type:'Case', fields: { subject:'demo', }, });constresponse=awaitcontext.org.dataApi.commitUnitOfWork(uow);constcaseId=response.get(referenceId).id;constresult=awaitcontext.org.dataApi.query(// 'SELECT Id, Name FROM Account'`SELECT Id, CaseNumber,Subject FROM Case WHERE Id = '${caseId}'` );return result;}