What part of this link causes the navigation frame to show?

scottatah
Giga Expert

Morning,

 

I recently discovered that my survey links do not cooperate with our SAML/ADFS.   Basically it lacks the deep-linking portion and rather than authenticating a user and redirecting them to the survey, it just leaves them at their self-service page.   If they were to click the survey link again (once already authenticated), it would take them to a full page survey (no nagivation bar).   After comparing my survey link to a working incident link and some trial and error, I've managed to build a survey link that cooperates with SAML/ADFS, however, the survey page now includes the navigation bar on the left.   While this isn't horrible, I think I liked it better when there was no navigation bar displayed in the survey.   Navigating away from the survey would leave the user with no option to get back to their survey apart from clicking the link again (we're currenlty on calgary)My question is, what is it about the "Working survey link with nagivation bar" below that causes the navigation bar to display?  

 

BROKEN SURVEY LINK:

https://blah.service-now.com/survey_take.do?sysparm_survey=IS-Survey&sysparm_task_survey=ea3e691d4ca...

 

WORKING INCIDENT URL:

https://blah.service-now.com/nav_to.do?uri=incident.do%3Fsys_id=39479a494ca3a5003d78bc4e88e343da%26s...

 

WORKING SURVEY LINK WITH NAVIGATION BAR:

https://blah.service-now.com/nav_to.do?uri=survey_take.do?sysparm_survey=IS-Survey&sysparm_task_surv...

1 ACCEPTED SOLUTION

kevin_sherman
Giga Contributor

Hey Scott,


The part you're looking for is "/nav_to.do?uri=". That indicates to SN to open whatever path follows the '=' with the navbar and other accoutrements. You should be able to remove that section and leave what comes after to get just that page.


View solution in original post

5 REPLIES 5

kevin_sherman
Giga Contributor

Hey Scott,


The part you're looking for is "/nav_to.do?uri=". That indicates to SN to open whatever path follows the '=' with the navbar and other accoutrements. You should be able to remove that section and leave what comes after to get just that page.


Good news is that you appear to be correct.   Bad news is removing that causes the page to fail to load properly with SAML/ADFS.



If anyone has a suggestion for a link without the Nav bar that also cooperates with SAML/ADFS I'd love to hear.


Have you tried adding saml_redirector.do?



We updated the following function in the task survey events business rule:


function getSurveyURL(taskSurveyID, surveyName) {


    surveyName = encodeURIComponent(surveyName);


    return getURLPrefix() + '/saml_redirector.do?sysparm_uri=survey_take.do?sysparm_survey=' + surveyName + '%26sysparm_task_survey=' + taskSurveyID;


}


I haven't tried that, but I'm now discovered we have a bigger issue with our survey URL link that first thoguht.   On Eureka Patch 5, this link in combination with the new SAML script is causing surveys to be completed, but not all of the appropriate tables are getting updated.   I'm still troubleshooting to find out which exactly is at fault, but on a quick try of your script, I couldn't get things to function.



Would you mind posting the whole thing?