cancel
Showing results for 
Search instead for 
Did you mean: 

Redirect to new page in SAP CDC UI builder

0 Kudos

Hi,

Need help to redirect to new page in SAP CDC UI builder. On which event (onError, onBeforeSubmit, onSubmit, onAfterSubmit, onBeforeScreenLoad, onAfterScreenLoad, onFieldChanged, onHide) i must write the javascript code to redirect.

former_member27
Community Manager
Community Manager
0 Kudos

Hi vipiny,

Welcome to the SAP Community. Thank you for visiting us to get answers to your questions.

Since you're asking a question here for the first time, I'd like to offer some friendly advice on how to get the most out of your community membership and experience.

First, please see https://community.sap.com/resources/questions-and-answers, as this resource page provides tips for preparing questions that draw responses from our members.

Second, feel free to take our Q&A tutorial at https://developers.sap.com/tutorials/community-qa.html, as that will help you when submitting questions to the community.

I also recommend that you include a profile picture. By personalizing your profile, you encourage readers to respond: https://developers.sap.com/tutorials/community-profile.html.

Now for some specific suggestions on how you might improve your question:

* Outline what steps you took to find answers (and why they weren't helpful) -- so members don't make suggestions that you've already tried.

* Share screenshots of what you've seen/done (if possible), as images always helps our members better understand your problem.

* Make sure you've applied the appropriate tags -- because if you don't apply the correct tags, the right experts won't see your question to answer it.

* Use the "insert code" feature when sharing your code, so members have an easier time reading.

Should you wish, you can revise your question by selecting Actions, then Edit.

The more details you provide (in questions tagged correctly), the more likely it is that members will be able to respond. As it stands, I don't know if there is enough information here for members to understand your issue. So please consider revising your question because I'd really like to see you get a solution to your problem!

I hope you find this advice useful, and we're happy to have you as part of SAP Community!

Regards,

Dedi

kobico
Advisor
Advisor
0 Kudos

Hi,

can you elaborate more on the use case? when do you want to redirect exactly?

in case it's when the form is submitted, then you should use "onAfterSubmit".

0 Kudos

Hi Kobi,

I have one cancel button on my page. When user click on that cancel button I want to redirect on new URL.

former_member27
Community Manager
Community Manager
0 Kudos

Hello again, vipiny,

I'm glad to see you got an answer to your question! If it helps you, please make sure to accept (you'll see the "accept" option beneath the question) -- so members with similar issues will be able to find a solution to their problems too.

If it doesn't help, you can always leave a comment providing more details that can guide members who wish to assist you.

I hope that this guidance is useful -- and we look forward to your next question for the community!

All the best,

Dedi

Accepted Solutions (0)

Answers (1)

Answers (1)

shemma
Advisor
Advisor

Hi vipiny,

It depends on your business requirement.

You basically can redirect on every event its up to you.

Some examples:

1. When error accrued as part of a form submission then i want to redirect the user to an error page, in this case i will add logic to the onError event.

2. On successful submission i want to redirect to the user profile, in this case i will add logic to onAfterSubmit.

0 Kudos

Hi Shem Maimon,

Thanks for your response.

Its not submit button. On cancel button (type=button) i want to redirect on new url.
Which event i need to write my code?

shemma
Advisor
Advisor
0 Kudos

Hi Vipin,

This is not supported at the moment, event will not be the solution here cause the click on the cancel button does not trigger any event.

A workaround for this is to add some javascript code to the screen set that will listen to the cancel button click event.