Event "app.record.create.submit.success"

Hello 
I have the following issues:

As usual, when creating a record successfully (when clicking “save” button, which is  corresponding “app.record.create.submit.success” event ), the page will be automatically loaded and redirect to the page corresponding “app.record.detail.show” event.

But I need to do something before the page will be redirected?

Is there any way to stop the page from redirecting?

Hello Tom

I’m not quite sure what you are trying to do since the “app.record.create.submit.success” event IS an event before it is redirected to the record detail page so can you not write a process in this event if you are trying to do something before it is redirected to the record detail page?

Ref: https://developer.kintone.io/hc/en-us/articles/213149077-Record-Create-Event#SaveSubmitEvent

Hello Yuzo

Yes, You’re right. I need to write a process in the event “app.record.create.submit.success”, but the page will be automatically redirected so I can’t do anything 

Thanks

Tom

Hey Tom

It will be great if you can explain briefly what you are trying to do, but I feel like the kintone.Promise maybe the answer for you.

Whenever you try to use any asynchronous process such as the kintone.api or the kintone.proxy within any kintone event, the kintone event process completes first so it can’t run the asynchronous process w/o using the synchronous XMLHttpRequest or the kintone.promise. Since there are some issues using the synchronous XMLHttpRequest, kintone recommends using the kintone.Promise, which allows you to run asynchronous process within the event w/o using the synchronous XMLHttpRequest so please check into it.

kintone developer network - Using Promises over Synchronous XHR
https://developer.kintone.io/hc/en-us/articles/115007823527-Using-Promises-over-Synchronous-XHR

(by the way, I believe you can’t stop the redirect after successful submit)

Again, if this isn’t the thing, can you please explain what you are trying  to do?

Thank you