Nicholas Williams
03/25/2022, 1:29 PMCD
03/25/2022, 2:01 PMNicholas Williams
03/25/2022, 2:10 PMMTNathan
03/25/2022, 3:16 PMafterSubmit
on a UE script, which is what I'd recommend using for this. Even if you could do it in a client script, it would likely trigger the redirect before the delete went through, much like returning false
in saveRecord
.Nicholas Williams
03/25/2022, 3:17 PMMTNathan
03/25/2022, 3:26 PMcontext.request.parameters.[paramterName]
(assuming this is SS2.x), though my only uses of that that I can find quickly are in beforeLoad
so I don't know if it'll work directly in afterSubmit
. If it doesn't work in afterSubmit
, you could always just add a scripted field in beforeLoad
to store the parameter info in, and then reference it in the afterSubmit
.MTNathan
03/25/2022, 3:28 PMcontext.request
appears to only be available in beforeLoad
, but you could still leverage that in combination with a scripted field.Nicholas Williams
03/25/2022, 3:28 PMNicholas Williams
03/25/2022, 3:31 PMMTNathan
03/25/2022, 3:34 PMbeforeLoad
, grab the parameter info and set it into that field in pageInit
, and then use that info for the redirect in afterSubmit
. But I'd have to imagine that you could skip the client-side portion of that since the parameters should be available in beforeLoad
.Nicholas Williams
03/25/2022, 3:36 PMMTNathan
03/25/2022, 3:58 PMafterSubmit
, but that shouldn't affect whether or not scriptContext.request.parameters.rtype
shows scriptContext.request
as undefined per your error (I'm assuming that's the line that the previously-mentioned error is occurring on). Maybe try logging scriptContext
to see what its properties are in case something unexpected is going on there?Nicholas Williams
03/25/2022, 4:05 PM