Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Custom report suite configuration

olivia518
Level 1
Level 1

Hi,

 

I have multiple report suites I need to send multiple web links to. For some reason this code only works in the code for the library management section. I want to move this down to the customize page code section, but it wont work. I even tried selecting the "After UI settings (custom code takes precedence)" option.

 

function setSAccount(href) { var prod = /(^(prod[0-9]w[0-9])$)|(^(origination[0-9]w[0-9])$)|(^(servicing[0-9]w[0-9])$)/, href = window.location.href, beta = /(^(beta[0-9]w[0-9])$)|(^(originationbeta[0-9]w[0-9])$)|(^(servicingbeta[0-9]w[0-9])$)/, test = /(^(test[0-9]w[0-9])$)|(^(originationtest[0-9]w[0-9])$)|(^(servicingtest[0-9]w[0-9])$)/, a = href.split("//"), b = a[1].split("."), if(b[0].indexOf("www") == 0) { s_account = 'reportsuiteprod,reportsuiteglobalprod'; }else if (b[0].indexOf("beta") == 0 ) { s_account = 'reportsuitebeta'; }else if (b[0].indexOf("test") == 0 ) { s_account = 'reportsuitetest,reportsuiteglobaltest'; } return s_account; };
1 Accepted Solution
ParitMittal
Correct answer by
Level 10
Level 10

Hi Olivia,

We tried doing the similar thing to my own DTM Implemenation and the code was working even when placed in the "Customize Page Code " Section. Please find below the code which we placed on our site :

function setSAccount() { var href = window.location.href; var a = href.split("//"); var b = a[1].split(":"); if(b[0].indexOf("localhost") == 0) { s_account = 'reportsuiteprod,reportsuiteglobalprod'; }else if (b[0].indexOf("beta") == 0 ) { s_account = 'reportsuitebeta'; }else if (b[0].indexOf("test") == 0 ) { s_account = 'reportsuitetest,reportsuiteglobaltest'; } return s_account; } s.account= setSAccount();

Can you please share DTM account login credentials in a private message so that we can debug the same from our end.

Thanks & Regards

Parit Mittal

View solution in original post

1 Reply
ParitMittal
Correct answer by
Level 10
Level 10

Hi Olivia,

We tried doing the similar thing to my own DTM Implemenation and the code was working even when placed in the "Customize Page Code " Section. Please find below the code which we placed on our site :

function setSAccount() { var href = window.location.href; var a = href.split("//"); var b = a[1].split(":"); if(b[0].indexOf("localhost") == 0) { s_account = 'reportsuiteprod,reportsuiteglobalprod'; }else if (b[0].indexOf("beta") == 0 ) { s_account = 'reportsuitebeta'; }else if (b[0].indexOf("test") == 0 ) { s_account = 'reportsuitetest,reportsuiteglobaltest'; } return s_account; } s.account= setSAccount();

Can you please share DTM account login credentials in a private message so that we can debug the same from our end.

Thanks & Regards

Parit Mittal

View solution in original post