Redirect to custom SP page after submitting record producer through onsubmit client script

Rajeev ponuguma
Kilo Guru

i have created record producer to create demand request. after submission it has to redirect to custom page 'demand details' which is same like ticket page . But it is not redirecting . i tried many ways but no luck.

i created below onsubmit client script 

 

var CurrentSysId = g_form.getUniqueValue();

function fun2() {
top.window.location = '"sp?id=demand&table=dmn_demand&sys_id=CurrentSysId&view=sp';
}

It is redirecting to 'demand' page ,but in the URL it is not taking sys_id dynamically ,sys_id is taking static value as CurrentSysId.

 

Please help me how can i get sys_id dynamically in the URL

 

1 ACCEPTED SOLUTION

Rajeev ponuguma
Kilo Guru

Now got it  with below script

 

producer.portal_redirect = "sp?id=demand&table=dmn_demand&sys_id="+current.getUniqueValue();

View solution in original post

3 REPLIES 3

Neeraj Modi
Tera Guru

Hi @Rajeev ponuguma 

Can you try replacing the assignment of top.window.location to the below suggetion.

top.window.location = 'sp?id=demand&table=dmn_demand&sys_id=' + CurrentSysId + '&view=sp';

Please mark the suggestion as helpful, if you find it useful to you or others who wants to refer similar content.
Please mark the solution as correct, if the answer provided by me has resolved your query.


Thank you!

Hello Niraj,

Now it is taking sys_id but sysid of record producer not the record we submitted from service portal. Can you please help how to get submitted record sys_id instead of record producer sys id

Rajeev ponuguma
Kilo Guru

Now got it  with below script

 

producer.portal_redirect = "sp?id=demand&table=dmn_demand&sys_id="+current.getUniqueValue();