Submit button functionality
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 05:38 AM - edited 08-28-2023 07:13 AM
Hi,
We have a requirement to make the change request form to stay on the current page on clicking submit.
Here is the code:
Condition: current.canCreate()
answer = current.insert();
gs.include('ActionUtils');
var aUtil = new ActionUtils();
aUtil.postInsert(current);
action.setRedirectURL(current);
On creating new change record it is working but if we create change record from "Copy Change" UI action it is redirecting to previous screen.
Can anyone help with this?
Thanks in advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 06:00 AM
Hi @_SnowDeveloper,
Can you please try the below mentioned code
Condition: current.canCreate()
var answer = current.insert();
gs.include('ActionUtils');
var au = new ActionUtils();
au.postInsert(current);
var url=answer.getLink(true);
action.setRedirectURL(url);
Regards,
Kapil Khedkar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 07:50 AM - edited 08-28-2023 07:57 AM
Thank you, but it didn't work.
Use case is: 1. click "copy change" then change form will open
2. then after clicking on "Submit" it should stay on the same page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 06:56 AM
Hi
the "Copy Change" UI Action is a completely different functionality and thus cannot be mixed.
Maik
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-28-2023 07:05 AM
Hi,
Thank you.
Please let me know, if you have any suggestions to achieve that use case