It's mentioned in several places in the help and sample code that you can redirect to a second assistant from a primary assistant. In the code sample they are using an HTML link to jump to the other assistant but in my setup I'm redirecting in a POST event.
Basically, if a user checks a certain option when they navigate to the next step I am redirecting them to the "sub assistant" and then upon completion I want them redirected back to the original, the latter of which should be handled by the customwhence property. Problem is, when my assistant is finished it just redirects to the regular finished step rather than going back to the original assistant.
Here is the redirect code that sets the customwhence. Note that the help is severely lacking information in this regard so I had to make some assumptions on how to do this.
handleStep1Post = function MRFUAsst_handleStep1Post() { // Launch the other assistant, set the field that it was "done" var medRecId = _assistant.getStep(1).getFieldValue(medRecFollowUpAsst.FLD.MEDRECID) var doSendRequest = request.getParameter(medRecFollowUpAsst.FLD.SEND_REQ); if(doSendRequest) { var whence = nlapiResolveURL('SUITELET',nlapiGetContext().getScriptId(), nlapiGetContext().getDeploymentId()); nlapiSetRedirectURL('SUITELET', '102', 1, false, {customwhence: whence}); return false; } return true; } Question #1 - Is this a valid method to set the customwhence parameter?Question #2 - What do I need to do in the sub-assistant to cause it to correctly redirect back to the value set in customwhence?I'm pretty stuck and would appreciate any help someone can provide here.