自動採番障害対応

This commit is contained in:
2023-11-01 22:59:23 +09:00
parent cfc416fd14
commit a782e92bd6
2 changed files with 10 additions and 5 deletions

View File

@@ -86,8 +86,12 @@ export class AutoNumbering implements IAction{
let number :string='';
let prefix:string='';
let suffix:string='';
let no = await this.fetchNo();
let no=1;
try{
no = await this.fetchNo();
}catch(error){
console.log(error);
}
if(props.format!==undefined && props.format!==''){
number=Formatter.numberFormat(no, props.format);
}else{
@@ -106,6 +110,7 @@ export class AutoNumbering implements IAction{
async fetchNo():Promise<number>{
let recNo=1;
return await new kintone.Promise<number>((resolve,reject)=>{
const appurl = kintone.api.url('/k/v1/records',true);
const params={