How to change default portal URL in survey notification email script?

Morten Steenbac
Giga Expert

My service portal for IT is not using the OOTB '/sp' portal, but '/itservice' instead.

When sending out survey invites, the email script that generates the survey URL doesn't seem to take the scenario of different portals into account.

Specifically, in the email script there is a call to the AssessmentUtils script include, which returns a URL for the deault '/sp' portal.

var link = new AssessmentUtils().getAssessmentInstanceURL(current.sys_id);

 

When looking into the script include, I can see that a 'defaultServicePortal' variable is used to build the URL for the survey.

What is the best way to handle multiple portals, while staying as close to OOTB and not impacting the upgradability?

if(this.redirectToPortal() == 'true'){
			if(asmtRec.allow_public)
				url = instanceURL + this.defaultServicePortal + '?id=public_survey&instance_id='+instance;
			else
				url = instanceURL + this.defaultServicePortal + '?id=take_survey&instance_id='+instance;
		}
1 ACCEPTED SOLUTION

Morten Steenbac
Giga Expert

Solved...

Setting the 'Default' attribute to true on the portal for which you would like the URL to point to solved it.

Though running survey responses from different portals on the same instance, seems to be unsupported OOTB.

find_real_file.png

View solution in original post

2 REPLIES 2

Morten Steenbac
Giga Expert

Solved...

Setting the 'Default' attribute to true on the portal for which you would like the URL to point to solved it.

Though running survey responses from different portals on the same instance, seems to be unsupported OOTB.

find_real_file.png

HI,

Yes you are right. Whenever we mark Default true on service portal it will get redirected to that portal as well.

this.defaultServicePortal change is currently not available.

 

What we do is, We modify the email script and do some extra code there to redirect user to respective portals

Thanks,
Ashutosh