Avatar

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

Tom

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?

Follow 1 follower
0

3 comments

Avatar
Tom 0 votes

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

0
Comment actions Permalink
Avatar
Yuzo Arai 0 votes

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

0
Comment actions Permalink