This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

APPLICATION - PRODUCT ENGINEERING - Hyperlinks in email notifications not working in 11 Sp5 build 6296

Bryanjscott777 - Tuesday, June 14, 2016 3:19 PM:

Normal 0 false false false false EN-US X-NONE X-NONE

Good afternoon,
I am having trouble with hyperlinks in email notifications after setting up a new test instance of 11SP5 build 6296.
On the original test instance (11  build 6073), the following string would launch Aras and open the item associated with the GUID:
umcapptest01/.../default.aspx
In the new 11sp5 instance build 6296, I replaced the umcapptest01/innovator with new values, but I now see the following errors:
The method “selectStartPage” failed.
Technical Message    aras_object: “undefined” : “aras.setup_query.StartItem.split is not a function”
Stack Trace     Client Side Error
 
and
 
The method “runStartPage” failed.
Technical Message    aras_object: “undefined” : “aras.setup_query.StartItem.split is not a function”
Stack Trace     Client Side Error
 
Comparing the (2) methods (“selectStartPage” and “runStartPage”) from the 2 instances, it appears that a change was made to these 2 files as follows (not sure if/how this affects the hyperlinks):
11 build 6073:  top.aras.setup_query.StartItem
11 sp5 build 6296:   aras.setup_query.StartItem
 
 “selectStartPage”:
11 build 6073:
if (!top.aras || !top.aras.setup_query || !top.aras.setup_query.StartItem) return;

if (top.aras.setup_query.StartItem == 'inbasket')
  return 'InBasket Task';

var arr = top.aras.setup_query.StartItem.split(":");
var type = arr[0];
var id = arr[1];
if (type && !id) return type;
 
11 sp5 build 6296:
if (!aras || !aras.setup_query || !aras.setup_query.StartItem) return;

if (aras.setup_query.StartItem == 'inbasket')
  return 'InBasket Task';

var arr = aras.setup_query.StartItem.split(":");
var type = arr[0];
var id = arr[1];
if (type && !id) return type;

 

“runStartPage”

11 build 6073:

if (!top.aras.setup_query.StartItem) return;
var arr = top.aras.setup_query.StartItem.split(":");
var type = arr[0];
var id = arr[1];
if (!type || !id) return;
var itm = top.aras.getItemById(type, id, 0);
if (itm)  top.aras.uiShowItemEx(itm, undefined);

 

11 sp5 build 6296:

if (!aras.setup_query.StartItem) return;
var arr = aras.setup_query.StartItem.split(":");
var type = arr[0];
var id = arr[1];
if (!type || !id) return;
var itm = aras.getItemById(type, id, 0);
if (itm)  aras.uiShowItemEx(itm, undefined);

 

Am I missing something stupid here?

Can anyone help with a fix of provide guidance?

 
Thanks,



edonahue - Wednesday, June 15, 2016 11:05 AM:

Hi Bryan,

This is a known issue in Innovator 11.0 SP5 that will be resolved in a future version of Aras Innovator.

However, the following workaround may resolve this issue for you:

 

  1. Navigate to your code tree in a file browser (the root installation directory, default C:Program Files (x86)ArasInnovator)
  2. Open InnovatorClientscriptsmainTree.html for editing.
  3. Insert the highlighted lines code and save the file.

. . .

topWindow.arasMainWindowInfo.arasMainWindowLoading = false;

var startItem = topWindow.aras.setup_query["StartItem"];

if (startItem) {

// Workaround for StartItem

startItem = typeof(startItem)=="object" ? startItem[0] : startItem;

var itemInfo = startItem.split(":");

topWindow.aras.uiShowItem(itemInfo[0], itemInfo[1], "tab view"); 

}

. . .

Please be sure to clear your browser cache after making these changes.



Bryanjscott777 - Wednesday, June 15, 2016 11:38 AM:

Normal 0 false false false EN-US X-NONE X-NONE MicrosoftInternetExplorer4

Good morning Eli,
Thank you so much for the quick response!
I was able to make the modification to the mainTree.html file that you recommended and the object will now load from the email notification hyperlink, however, I still get the error messages from the “selectStartPage” and “runStartPage” methods about .split not being a function, should these error messages still be popping up?
 
Thanks,  Bryan



edonahue - Monday, June 20, 2016 10:24 AM:

Hi Bryan,

You should be able to prevent those errors if you explicitly convert StartItem to a string before the .split() function. You will need to do so in both the selectStartPage and runStartPage Method items in the database.

Replace:  aras.setup_query.StartItem.split(":")

With:  aras.setup_query.StartItem.toString().split(":")

 

 


Bryanjscott777 - Monday, June 20, 2016 10:35 AM:

Good morning Eli,
Works perfect!!!
Thank you so much :)
Bryan