+ Start a Discussion

Getting error when i run custom link having s-control

i am using sforce API 6.0 and asp.net using c#.
I have added one custom link to account page .This custom link is created using
s-control. when i click on this custom link i got error like - object doesn't support this property or method. i have written html body i.e. java script when i created scontrol.
in this html body i have called webservices of my project.
when i write same java script in outside explorer page it works finely.
can anyone tell me solution on this .

Hi guddu,

More information is needed. Can you post the contents of your sControl?

HINT: and a textarea tag to your post using the HTML Editor mode. Switch to Graphical Editor mode and resize your textarea and paste the contents of your scontrol into the textarea.
hello ,
thanx for the reply.
actually i have called my webservice in javascript.for that webservice.htc file is required. i can not put this webservice.htc file in the html body of the s-control.
thats why i am getting error , i think.
what i have to do , i have to call sforce API in the jaascript of html body in scontrol.

here is my code in the html body of scontrol. plz suggest me the solution



 <script language="JavaScript">
 var iCallID = 0;

function init()

                     // alert("hi");
   iCallID = service.MyMath.callService(mathResults,"QuerySample");


function mathResults(result) {
  if(result.error) {
    var xfaultcode   = result.errorDetail.code;
    var xfaultstring = result.errorDetail.string;
    var xfaultsoap   = result.errorDetail.raw;
  } else{
   window.open ("http://localhost/SalesProject/Login.aspx",


   window.open ("http://localhost/SalesProject/Welcome.aspx",







<body onload="init()">

<DIV ID="service" style="behavior:url(webservice.htc)" >



If you are making your call from javascript, why not use the AJAX toolkit? http://blog.sforce.com/sforce/2005/07/ajax_toolkit.html

Message Edited by DevAngel on 11-10-2005 08:39 AM