• joe-kizay
  • NEWBIE
  • 0 Points
  • Member since 2005

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 2
    Questions
  • 6
    Replies
Ive seen this question posted before with no answer to it. Just wondering if anyone has worked this out. I am trying to display a picklist filtered by the value selected by the parent picklist. Below is the code I am working with. The problem I have is that validFor for a picklistValue is nothing. From what I read in the API, validFor returns some sort of byte array but just looking at the toolkit it seems it is never populated with anything. It is just initialized to a new array (Sforce.PicklistEntry.prototype.validFor = new Array();).
 
Suggestions? Thanks...
 
Code:
 var s = sforceClient.DescribeSObject(sfdcObjName);
 var picklistValArray = new Array();
 var valid4 = null;

 for(var x=1;x<s.fields.length;x++)
 {

  if(s.fields[x].type=="picklist" && s.fields[x].name == colName)
  {
   if(wDepend)
   {
    isDependent = s.fields[x].dependentPicklist;
   }

   var pls = s.fields[x].picklistValues;

   for(var y=0;y<pls.length;y++)
   {
    valid4 = pls[y].validFor; 
    picklistValArray[y] = pls[y].value;
   }
  }
 }

 return picklistValArray;
}

 
I am trying to use the DescribeSObject method in javascript using the 3.3 sforceclient.js. For some reason the same code that was working before the weekend isnt now just a few days later. Just wondering if anyone else has experienced this problem or if Im just nuts.
 
var s = sforceClient.DescribeSObject("Case");
 
Gives me an error on line 2542 "Object required".
 
I did noticed the thread on DescribeSObjects not working with the 3.3 js but from what I understood using DescribeSObject individually was the workaround. Anything else I could try would be greatly appreciated.
 
Thanks.
"Permission denied to call method XMLHttpRequest.open"
 
I am testing with some cross browser apps.
 
I have an HTML page which I load locally which has the the following :
 
      Code:
var result = sforceClient.login(DebugUser,DebugPass); 

 
This works fine when I test with IE (6.0.2900.) but with FF (1.5.0.4) it throws the above exception.
 
I can't find the call that is throwing the error (the debugger is not really that good in FF) but I have had the same issue when trying to load XML documents which was caused by the following:
 
ThIS Works in IE but not in FF
 

Code:

Tester= getXMLHTTPRequest();

Tester.open("get","Sample.xml",false)

Tester.send();


 

Works fine in IE but in FF it throws the same error. FF, it seems, demands a NULL parameter in the send.

Code:

Tester= getXMLHTTPRequest();

Tester.open("get","Sample.xml",false)

Tester.send(null);


 
This works with both . Perhaps this is the issue here as well?

I have no problem using

Code:

sforceClient.init("{!API_Session_ID}","{!API_Partner_Server_URL_70}");


 
 Within an SControl on FF 1.5, so I don't think this is super-urgent, but it would improve things on the testing front here as we have other surpise errors caused by cross-domain calls that are making life difficult enough!

Any comments or suggestions welcomed.

Thanks

Gareth.

 
 

Message Edited by Gareth Davies on 06-14-2006 03:30 PM

Hello,

This is my first post. I have a custom object, and I need to count the number of events attached to the custom object and update the event count on the custom object. Is this possible using an s-control? I have limited programming experience, but can understand code. I appreciate your help in advance.

In my orgonization , a sungle support cases can be handled by multple people,like tier1, tier2 , engineerin support etc. I would to get an idea on how much time each people spend on each cases. The idea i am thinking is when ever a CSR update the case comment they should be entering the time spent and the type of  the task he/she did. This way for the same case I will have a history of the time spend. Thus I can get the exact time.
 
I created a master detail relation ship for tracking this. The problem is that I cannot attach that to the case comment, because case comments are not customizable. Ideally I want to make mandatory when they enter case comments.
 
Any one colved this problem. One idea I have is to use s-control to popup this time spend dialog when people enter case comments and update the case with that information. I do not have any experience in writing s-control.
 
Any clues how to write this? Any one better idea?
 
I am trying to use the DescribeSObject method in javascript using the 3.3 sforceclient.js. For some reason the same code that was working before the weekend isnt now just a few days later. Just wondering if anyone else has experienced this problem or if Im just nuts.
 
var s = sforceClient.DescribeSObject("Case");
 
Gives me an error on line 2542 "Object required".
 
I did noticed the thread on DescribeSObjects not working with the 3.3 js but from what I understood using DescribeSObject individually was the workaround. Anything else I could try would be greatly appreciated.
 
Thanks.
Does anyone have a quick example of how to read the dependent picklist metadata through the AJAX toolkit. I have got as far as reading validFor against each picklist value, but it looks empty - I'm guessing I'm casting it incorrectly somehow ?

I'm using beta3.3 and I am also trying to loosely follow the documentation for the Java version in the API docs.

Cheers
Andy

  • May 03, 2006
  • Like
  • 0
Is it possible to use sforceClient.Login within an sControl rather than sforce.init?  I would like to allow my sControl to login as an adminstrative user as a security work-around, but I keep getting errors when calling the Login method.
 
Thanks.
  • May 03, 2006
  • Like
  • 0