• sasa
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 4
    Replies
Hi,

      I'm using this string in my code to bring the user to another page, but i keep getting phased into the Salesforce's default "Error: URL no longer exist" page before getting my final page. This is happening to all my redirection. Can anyone help?

var homeurl='{!URLFOR( $Action.Report_Request__c.Tab, $ObjectType.Report_Request__c)}';
window.parent.location.href = homeurl;

thks
Lynn
  • September 26, 2008
  • Like
  • 0
Hi ,

    I got this error after registering my Namespace

ERROR - Evaluation error: System.Exception: Got an unexpected error in callout : String index out of range: -1. Contact support with error ID: 1992303620-2021 (1561563096)

    Did anyone here experience the same too?

thks
Lynn
  • September 09, 2008
  • Like
  • 0
Anyone here has registered Namespace already?

We just had our Namespace registered and our links are now broken. e.g

we were using this string
var returl = "{!URLFOR( $Action.CObject1__c.Next ,  $ObjectType.CObject1__c,null,true)}&rptid=" + result[0].id;

and after registering Namespace it automatically changes all my codes in SControl into this -->
var returl = "{!URLFOR( $Action.Namespace__CObject1__c.Next ,  $ObjectType.Namespace__CObject1__c,null,true)}&rptid=" + result[0].id;

and with error returned from browser as
uncaught exception: {faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'CObject1__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'CObject1__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', row:'-1', column:'-1', }, }, }

our customer object clearly already have __c appended. and this code resides in SControl calling another SControl after inserting details into CObject1.

Anyone knows what's wrong ?
  • September 09, 2008
  • Like
  • 0
Hi,

      I'm using this string in my code to bring the user to another page, but i keep getting phased into the Salesforce's default "Error: URL no longer exist" page before getting my final page. This is happening to all my redirection. Can anyone help?

var homeurl='{!URLFOR( $Action.Report_Request__c.Tab, $ObjectType.Report_Request__c)}';
window.parent.location.href = homeurl;

thks
Lynn
  • September 26, 2008
  • Like
  • 0
Anyone here has registered Namespace already?

We just had our Namespace registered and our links are now broken. e.g

we were using this string
var returl = "{!URLFOR( $Action.CObject1__c.Next ,  $ObjectType.CObject1__c,null,true)}&rptid=" + result[0].id;

and after registering Namespace it automatically changes all my codes in SControl into this -->
var returl = "{!URLFOR( $Action.Namespace__CObject1__c.Next ,  $ObjectType.Namespace__CObject1__c,null,true)}&rptid=" + result[0].id;

and with error returned from browser as
uncaught exception: {faultcode:'sf:INVALID_TYPE', faultstring:'INVALID_TYPE: sObject type 'CObject1__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', detail:{InvalidSObjectFault:{exceptionCode:'INVALID_TYPE', exceptionMessage:'sObject type 'CObject1__c' is not supported. If you are attempting to use a custom object, be sure to append the '__c' after the entity name. Please reference your WSDL or the describe call for the appropriate names.', row:'-1', column:'-1', }, }, }

our customer object clearly already have __c appended. and this code resides in SControl calling another SControl after inserting details into CObject1.

Anyone knows what's wrong ?
  • September 09, 2008
  • Like
  • 0
Hi,
 
  I have webservice written in .net located on my machine (I could see the web page located in same directory from URL type s-control in salesforce. so that means salesforce can access the files from that directory.)  I generated APex class from the WSDL(had to remove soap12 bindings).
 
//Generated by wsdl2apex
public class tempuriOrg {
    public class HelloWorld_element {
        public String arg;
        private String[] arg_type_info = new String[]{'arg','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true'};
        private String[] field_order_type_info = new String[]{'arg'};
    }
    public class testSalesForceSoap {
        public String endpoint_x = 'http://machineName/virtualdirectoryname/testSalesForce.asmx';
        private String[] ns_map_type_info = new String[]{'http://tempuri.org/', 'tempuriOrg'};
        public String HelloWorld(String arg) {
            tempuriOrg.HelloWorld_element request_x = new tempuriOrg.HelloWorld_element();
            tempuriOrg.HelloWorldResponse_element response_x;
            request_x.arg = arg;
            Map<String, tempuriOrg.HelloWorldResponse_element> response_map_x = new Map<String, tempuriOrg.HelloWorldResponse_element>();
            response_map_x.put('response_x', response_x);
            WebServiceCallout.invoke(
              this,
              request_x,
              response_map_x,
              new String[]{endpoint_x,
              'http://tempuri.org/HelloWorld',
              'http://tempuri.org/',
              'HelloWorld',
              'http://tempuri.org/',
              'HelloWorldResponse',
              'tempuriOrg.HelloWorldResponse_element'}
            );
            response_x = response_map_x.get('response_x');
            return response_x.HelloWorldResult;
        }
    }
    public class HelloWorldResponse_element {
        public String HelloWorldResult;
        private String[] HelloWorldResult_type_info = new String[]{'HelloWorldResult','http://www.w3.org/2001/XMLSchema','string','0','1','false'};
        private String[] apex_schema_type_info = new String[]{'http://tempuri.org/','true'};
        private String[] field_order_type_info = new String[]{'HelloWorldResult'};
    }
}
 
 
then I wrote wrapper apex class to call the apex code generated.
 
global class testSalesforce{
WebService static string test1(string name) {
tempuriOrg.testSalesForceSoap soap = new tempuriOrg.testSalesForceSoap();
return soap.HelloWorld('hello world !!! ' + name);}}
 
Then I created s-control to call this new webservice.
 
<html>
<head>
<script type="text/javascript" src="/js/functions.js"></script>
<script src="/soap/ajax/10.0/connection.js"></script>
<script src="/soap/ajax/10.0/apex.js"></script>
<script>
function X() {
try{
var result = sforce.apex.execute("testSalesforce" ,"test1", {arg:" hello"});
}
 catch (ex)
      {
       alert ("Failed : " + ex);
      }
}
</script>
</head>
<body onload=X()>
 <div id=userNameArea></div>
</body>
</html>
 
In security controls/remote site settings I have http://machinename url provided.
 
I am invoking the s-control on custom button click. when I give machinename in endpoint_x, I am getting:
System.CalloutException: Web service
    callout failed: Unexpected element. Parser was expecting element
    'http://schemas.xmlsoap.org/soap/envelope/:Envelope' but found ':HTML'
 
and when I give ip address in endpoint_x and remote site settings I am getting :
IO Exception: Read Timed out
 
What do I need to do to get it working?
 
Thanks,


Message Edited by NewToSF on 04-01-2008 11:52 AM