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

Problem with an S-Control which is intended to perform a case search
I want to have a search field on the SalesForce home page (home tab) where one can enter a case number and after clicking on Search-button being redirected to this case. However something in the following code is wrong, the variable "ident" don't take the CaseID but something else. And I'm also not sure if the URL -creation statement is correct.
Code:
The other problem would be the integration of this S-Control in the home tab. If I enter this code in setup->customize->home->home page components->new, the script will be removed after save. But apparently it will work through a frame
Code:
with xxxxxxxxxxxxxxx being the S-Control ID. However in this case the found case will be displayed in the frame, while it should be displayed in the standard view (or even better in a new register tab). Can this be solved?
Code:
<html> <head> <script src="/soap/ajax/10.0/connection.js"></script> <script language="JavaScript"> function findCase(number) { var ident = sforce.connection.query("Select Id from Case where CaseNumber = '" + name + "' limit 1"); window.parent.location.href = "https://emea.salesforce.com/{ident}"; return false; } </script> </head> <body> <div> <FORM NAME="myform" onSubmit="return findCase(this)"> Enter Case Number: <BR> <INPUT TYPE="text" NAME="inputbox" size=10 VALUE=""/> <INPUT TYPE="SUBMIT" NAME="button" Value="Search Case"/><br> </FORM> </div> </body> </html>
The other problem would be the integration of this S-Control in the home tab. If I enter this code in setup->customize->home->home page components->new, the script will be removed after save. But apparently it will work through a frame
Code:
<IFRAME src="/servlet/servlet.Integration—lid=xxxxxxxxxxxxxxx&ic=1" frameBorder=0 width="100%" height=150></IFRAME>
with xxxxxxxxxxxxxxx being the S-Control ID. However in this case the found case will be displayed in the frame, while it should be displayed in the standard view (or even better in a new register tab). Can this be solved?
Message Edited by FGNY on 11-07-2007 09:10 AM
Code: