- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 08:59 AM
Hi,
I have created a Registration Form where user enter the information and press Sign Up button, upon click it will create a record in u_registration table till now everything is working fine.
Now once the user clicks the Sign up button i wanted to redirect to another page which is "user-assessment-page" and i wanted to display the current user entered information there
Once the user the submits i am getting the sys id of the created record how can i pass the sys id to User Registration widget under "user-assessment-page" page ?
Can anyone please help me how to do this ?
Solved! Go to Solution.
- Labels:
-
Service Portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 12:04 PM
Hi Shaik,
Did you remove the action and method part from the form tag.
Update your client script with this :
Try with this script: (changes are added $window in the function parameter and use $window.open();
And check also whether alert is coming or not:
function($window) {
/* widget controller */
var c = this;
c.addPersonalDetails = function() {
if(!c.data.name || !c.data.phone || !c.data.email || !c.data.applyfor)
{
alert("All fields are Mandatory");
}
else{
alert("Success")
c.server.update().then(function(response){
alert('inside' + data.sysid);
$window.open("/sp?id=preliminary_evaluation&sysid="+data.sysid);
})
}
}
Added alert for testing purpose.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 11:39 AM
Hi Shaik,
It is because you have used <form action="/examples/actions/confirmation.php" method="post">
this part
Instead of this :
use this : (Remove action part and method part).
<form >
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 11:58 AM
Sir,
Is there anything wrong in my script.
It is still not taking me to the other page 😞
I see the record is getting created in the logs i can see the sys id but it is not working
function($location) {
/* widget controller */
var c = this;
c.addPersonalDetails = function() {
if(!c.data.name || !c.data.phone || !c.data.email || !c.data.applyfor)
{
alert("All fields are Mandatory");
}
else{
alert("Success")
c.server.update().then(function(response){
c.data = {};
// $location.search('id=preliminary_evaluation&sysid='+c.data.sysid);
window.location.href="/sp?id=preliminary_evaluation&sysid="+data.sysid;
})
}
}
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 12:04 PM
Hi Shaik,
Did you remove the action and method part from the form tag.
Update your client script with this :
Try with this script: (changes are added $window in the function parameter and use $window.open();
And check also whether alert is coming or not:
function($window) {
/* widget controller */
var c = this;
c.addPersonalDetails = function() {
if(!c.data.name || !c.data.phone || !c.data.email || !c.data.applyfor)
{
alert("All fields are Mandatory");
}
else{
alert("Success")
c.server.update().then(function(response){
alert('inside' + data.sysid);
$window.open("/sp?id=preliminary_evaluation&sysid="+data.sysid);
})
}
}
Added alert for testing purpose.
Thanks,
CB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 12:12 PM
Yes i did remove the form action still it is not working
Can you please look into my instance if you dont mind ?
admin
12345
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2020 12:14 PM
Username and password invalid