You need to sign in to do that
Don't have an account?

Getting "Not Implemented" Javascript error on SrcUp function in IE
Hi All,
I have overridden , New Case button with on-click Javascript . Code works fine in all scenarios except one. When user clicks on New Case in Service Console , Case hover. If I scroll down to the Case related list in service console and then click on New Case it works fine in that case.
This is only happening in IE. Code works fine in Firefox.
Code :
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------
{!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")}
var RecordTypeFinAid= "Finance Advisor FinAid Case";
var RecordTypeNonFinAid= "Finance Advisor Non-FinAid Case";
var case1 = "Case";
var currentAccresults1=sforce.connection.query ("select Id from RecordType where Name='"+ RecordTypeFinAid+ "'" );
var AccRecords1=currentAccresults1.getArray("records");
var currentAccresults2=sforce.connection.query ("select Id from RecordType where Name='"+ RecordTypeNonFinAid+ "'" );
var AccRecords2=currentAccresults2.getArray("records");
var status={!('"'+Account.Acct_Status__c+'"')};
var url1= "/500/e?retURL=%2F{!Account.Id}&def_account_id={!Account.Id}&RecordType="+AccRecords1[0].get('Id')+"&ent=Case";
var url2= "/500/e?retURL=%2F{!Account.Id}&def_account_id={!Account.Id}&RecordType="+AccRecords2[0].get('Id')+"&ent=Case";
var url_finAid =url1+"&isdtp=vw";
alert(typeof(srcUp));
if (typeof(srcUp) == 'function') {
if(status!=null && ( (status).match("FINAID") !=null ) )
srcUp(url_finAid );
else
srcUp(url2+"&isdtp=vw");
}else{
if(status!=null && ( (status).match("FINAID") !=null ) )
window.location.replace(url1);
else
window.location.replace(url2);
}
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Any help is appreciated. Its driving me crazy !!
Hey Josh,
You know that feeling when you are stuck for hours and suddenly one clue and it works !! :)
Ok. Your solution didn't really work but it did point me in right direction. So, I got this error at window.parent.srcFromMain(url) saying srcFromMain doesn't exist.
Thanks to Chrome Javascript console , I went through other available functions from window.parent.
It turns out that navigatetoUrl always works in Service Console regardless of browser , hover or no hover. So, I simply changed :
srcUp(url)
to
Many many thanks Josh.
Happy thanks giving !
All Answers
Which version of IE?
It looks like IE might have different grammar for typeof:
http://msdn.microsoft.com/en-us/library/259s7zc1(v=vs.94).aspx
Its version 8.0.
Interestingly on firefox , its not throwing error but opening the new case page in the same frame rather than opening in a new tab while there is no error on Safari !!
Any help is really appreciated.
Thanks for responding Josh, but that's not it.
Because this not Implemented error comes only while clicking on hover New Case button. If I scroll down to the related list and click on New Case , it opens a sub tab just fine,
What's the actual text of the error message?
And where is srcUp getting defined? It appears the IE will throw not implemented if it is a previously defined function/variable - so if IE's version of srcUp was expecting different incoming params, for instance...
I think srcUp is defined in connection.js that I am including by {!REQUIRESCRIPT("/soap/ajax/22.0/connection.js")} .
If it were signature/parameter issue , it would throw the error even when we click in non hover scenario.
Exact text message is the same that I just provided It doesn't say much except Not Implemented.
srcUp does not appear to be defined in connection.js. The distinction between the hover area with "New Button" and the related list is that the hover area is served via a frame, and so may not have the same JS references to it.
You might try adding:
To your script to make sure it is implemented in both places.
Hey Josh,
You know that feeling when you are stuck for hours and suddenly one clue and it works !! :)
Ok. Your solution didn't really work but it did point me in right direction. So, I got this error at window.parent.srcFromMain(url) saying srcFromMain doesn't exist.
Thanks to Chrome Javascript console , I went through other available functions from window.parent.
It turns out that navigatetoUrl always works in Service Console regardless of browser , hover or no hover. So, I simply changed :
srcUp(url)
to
Many many thanks Josh.
Happy thanks giving !
Excellent - Most welcome, have a great holiday!