• StatBoyA
  • NEWBIE
  • 0 Points
  • Member since 2008

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 21
    Replies

To All,

 

I'm working with partner portal users...

 

I'd like a partner portal user to be able to schedule an event and invite "standard" SalesForce users to that event.

 

However, the search function for invitees does NOT provide a complete list of SalesForce users. 

 

I've dredged around and just can't seem to find any configuration setting that changes this.  Any suggestions?

 

Thanks much, Larry

In the past, I've typically separated test methods into a separate Apex class. 

 

Although I've had no particular problems with this, I'm now thinking that it might make more sense that test methods be included in the same class that actually implements the functions being tested. 

 

I wonder if the long-experienced coders here have any strong preferences one way or the other?  Test methods WITHIN the class being tested, or in a SEPARATE class devoted only to "testing" code? 

 

I'd also love some explanation of the practical benefits/detriments that have been experienced with either approach...

 

Thanks much.

 

 

To All,

I've discovered that the "New Contact" tab in the SalesForce non-profit template instance I'm now working on does NOTHING when I fill in data and then click the "save" button.

I've really hardly performed any diagnostics at all at this point, but figured my first effort should be to see if anyone ELSE had run into this same problem.

I'm running an account with "system administrator" profile.  The profile has "API Access" enabled, and sharing settings are set to allow both read and write of "contacts" and "household" objects are set to "public read/write".  

One other thing to mention:  I could SWEAR I tested this a couple months ago and found it working correctly.  But I don't have that FIRMLY documented, and I have just returned from 4 weeks of vacation, so it's possible I'm really not remembering that correctly.

Thanks much.

Larry
To All,

Well I've looked at MANY of the already existing messages about the "invalid_session_id" error arising during attempts to use an S-Control, but don't THINK that any have really FULLY addressed my situation.

As an example, I've created a very simple HTML S-Control definition that recreates the "invalid_session_id" error:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
   <head>
      <title>Create Household S-Control</title>
      <script language="javascript"
              src="/soap/ajax/13.0/connection.js"
              type="text/javascript"></script>
      <script language="javascript"
              type="text/javascript">
<!--
function initPage() {
   //Tests S-control function by attempting to create new account rec

   alert("running initPage function");

   //Calculate name value
   var nameval = "{!Contact.FirstName} {!Contact.LastName}"
                 + " Test Account";
   alert("calculated name: " + nameval);

   var obj = new sforce.SObject("Account");
   alert("past creation of javascript SObject");
   alert("created SObject of type: " + obj.type);
   obj.Name = nameval;
   //alert("finished assigning values to javascript Sbject");

   //create db rec using SObject
   try {
      var saveResult = sforce.connection.create([obj]);
      alert("successfully created db record");
   }
   catch(error) {
      alert("Error creating db rec: (" + error.faultcode + ") "
            + error.faultstring);
   }

}
//-->
      </script>
   </head>
   <body onload="initPage()">
      <div id="js_output">
      </div>
   </body>
</html>

I've defined a detail button on the main "Contacts" layout to trigger this S-Control.  I'm running it with a profile of "system administrator", and with the "API Access" setting in place.  I've also double-checked settings of the sharing rules in effect for this instance of SalesForce to ensure both read and write privileges are avalable.  I'm using a SalesForce instance established using the non-profit template from just about 5 months ago. 

When the S-Control is executed, all goes well until the attempted "sforce.connection.create".  At this point, the "catch" block is triggered and the alert message displaying the error message is displayed.

I'll anxiously away the valuable advice/thoughts of this community...   

Thanks MUCH.

Larry
I'm attempting a fairly simple S-Control including several uses of the API "query" function.  My current working example is very simple and very similar to examples provided in the Ajax Toolkit Developer's Guide, but does NOT run. 

As a relative novice, I suspect I'm overlooking something that would be obvious to the more experienced...

Here's an example of my code.  This is cut back to the minimum JUST to illustrate the error:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
   <head>
      <script src="/soap/ajax/12.0/connection.js"
              type="text/javascript"></script>

      <script type="text/javascript">
         function initPage() {
            var result = sforce.connection.query( "SELECT id, name from User");
         }
      </script>
   </head>
   <body onLoad="initPage();">
      <h1>Test S-Control</h1>
   </body>
</html>

Using FireFox with Firebug installed.  Error message is "uncaught exception". 

Firebug highlights "undefined" within it's more detailed output:  Here's the detail provided by Firebug (WITHOUT the highlighting):

uncaught exception: [Exception... "Unexpected error" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: https://na2.salesforce.com/soap/ajax/12.0/connection.js :: anonymous :: line 580" data: no]
newConnection()connection.js (line 578)
send("<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner...", Object isAsync=false isArray=false, false, undefined)connection.js (line 588)
_invoke("query", [Object name=queryString value=SELECT id, name from User], false, undefined, [Object ns=urn:partner.soap.sforce.com, Object ns=sobject.partner.soap.sforce.com prefix=ns1], "/services/Soap/u/12.0", "urn:partner.soap.sforce.com", "sobject.partner.soap.sforce.com")connection.js (line 1597)
invoke("query", [Object name=queryString value=SELECT id, name from User], false, undefined)connection.js (line 1536)
query("SELECT id, name from User", undefined)connection.js (line 1241)
initPage()servlet.Integrati... (line 12)


To All,

 

I'm working with partner portal users...

 

I'd like a partner portal user to be able to schedule an event and invite "standard" SalesForce users to that event.

 

However, the search function for invitees does NOT provide a complete list of SalesForce users. 

 

I've dredged around and just can't seem to find any configuration setting that changes this.  Any suggestions?

 

Thanks much, Larry

In the past, I've typically separated test methods into a separate Apex class. 

 

Although I've had no particular problems with this, I'm now thinking that it might make more sense that test methods be included in the same class that actually implements the functions being tested. 

 

I wonder if the long-experienced coders here have any strong preferences one way or the other?  Test methods WITHIN the class being tested, or in a SEPARATE class devoted only to "testing" code? 

 

I'd also love some explanation of the practical benefits/detriments that have been experienced with either approach...

 

Thanks much.

 

 

Is it true that s-controls will be phased out?

 

Thanks

To All,

I've discovered that the "New Contact" tab in the SalesForce non-profit template instance I'm now working on does NOTHING when I fill in data and then click the "save" button.

I've really hardly performed any diagnostics at all at this point, but figured my first effort should be to see if anyone ELSE had run into this same problem.

I'm running an account with "system administrator" profile.  The profile has "API Access" enabled, and sharing settings are set to allow both read and write of "contacts" and "household" objects are set to "public read/write".  

One other thing to mention:  I could SWEAR I tested this a couple months ago and found it working correctly.  But I don't have that FIRMLY documented, and I have just returned from 4 weeks of vacation, so it's possible I'm really not remembering that correctly.

Thanks much.

Larry
To All,

Well I've looked at MANY of the already existing messages about the "invalid_session_id" error arising during attempts to use an S-Control, but don't THINK that any have really FULLY addressed my situation.

As an example, I've created a very simple HTML S-Control definition that recreates the "invalid_session_id" error:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
   <head>
      <title>Create Household S-Control</title>
      <script language="javascript"
              src="/soap/ajax/13.0/connection.js"
              type="text/javascript"></script>
      <script language="javascript"
              type="text/javascript">
<!--
function initPage() {
   //Tests S-control function by attempting to create new account rec

   alert("running initPage function");

   //Calculate name value
   var nameval = "{!Contact.FirstName} {!Contact.LastName}"
                 + " Test Account";
   alert("calculated name: " + nameval);

   var obj = new sforce.SObject("Account");
   alert("past creation of javascript SObject");
   alert("created SObject of type: " + obj.type);
   obj.Name = nameval;
   //alert("finished assigning values to javascript Sbject");

   //create db rec using SObject
   try {
      var saveResult = sforce.connection.create([obj]);
      alert("successfully created db record");
   }
   catch(error) {
      alert("Error creating db rec: (" + error.faultcode + ") "
            + error.faultstring);
   }

}
//-->
      </script>
   </head>
   <body onload="initPage()">
      <div id="js_output">
      </div>
   </body>
</html>

I've defined a detail button on the main "Contacts" layout to trigger this S-Control.  I'm running it with a profile of "system administrator", and with the "API Access" setting in place.  I've also double-checked settings of the sharing rules in effect for this instance of SalesForce to ensure both read and write privileges are avalable.  I'm using a SalesForce instance established using the non-profit template from just about 5 months ago. 

When the S-Control is executed, all goes well until the attempted "sforce.connection.create".  At this point, the "catch" block is triggered and the alert message displaying the error message is displayed.

I'll anxiously away the valuable advice/thoughts of this community...   

Thanks MUCH.

Larry
How can I move data using VF or S-Control from one custom object to another custom object ?  I want to set up a condition or a button which when clicked would copy the field values from one custom object A into custom object B. I want a automated process which pre-populate fields which need not be re-entered.
 
Thanks,
Anusha
  
  • August 04, 2008
  • Like
  • 0
I was wondering if anyone on here has a suggestion on how to take a custom object that is related to a Lead and upon conversion link it to the account and Opportunity it creates. I am sure this is common but i wanted to see if there were specific ways or a standard best practice in coding this.


any response would be welcome

Cknight
I'm attempting a fairly simple S-Control including several uses of the API "query" function.  My current working example is very simple and very similar to examples provided in the Ajax Toolkit Developer's Guide, but does NOT run. 

As a relative novice, I suspect I'm overlooking something that would be obvious to the more experienced...

Here's an example of my code.  This is cut back to the minimum JUST to illustrate the error:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
   <head>
      <script src="/soap/ajax/12.0/connection.js"
              type="text/javascript"></script>

      <script type="text/javascript">
         function initPage() {
            var result = sforce.connection.query( "SELECT id, name from User");
         }
      </script>
   </head>
   <body onLoad="initPage();">
      <h1>Test S-Control</h1>
   </body>
</html>

Using FireFox with Firebug installed.  Error message is "uncaught exception". 

Firebug highlights "undefined" within it's more detailed output:  Here's the detail provided by Firebug (WITHOUT the highlighting):

uncaught exception: [Exception... "Unexpected error" nsresult: "0x8000ffff (NS_ERROR_UNEXPECTED)" location: "JS frame :: https://na2.salesforce.com/soap/ajax/12.0/connection.js :: anonymous :: line 580" data: no]
newConnection()connection.js (line 578)
send("<se:Envelope xmlns:se="http://schemas.xmlsoap.org/soap/envelope/"><se:Header xmlns:sfns="urn:partner...", Object isAsync=false isArray=false, false, undefined)connection.js (line 588)
_invoke("query", [Object name=queryString value=SELECT id, name from User], false, undefined, [Object ns=urn:partner.soap.sforce.com, Object ns=sobject.partner.soap.sforce.com prefix=ns1], "/services/Soap/u/12.0", "urn:partner.soap.sforce.com", "sobject.partner.soap.sforce.com")connection.js (line 1597)
invoke("query", [Object name=queryString value=SELECT id, name from User], false, undefined)connection.js (line 1536)
query("SELECT id, name from User", undefined)connection.js (line 1241)
initPage()servlet.Integrati... (line 12)