• Arman
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 12
    Questions
  • 10
    Replies
When I first learned about the Ajax Toolkit there used to be a Javadoc like API documentation which had the definition (ie. class fields and methods) of every class in the tool kit. I downloaded it from one of saleforce blogs.

I don't seem to find that anymore.Can someone help?
  • March 14, 2007
  • Like
  • 0
Hi,

I'd like to have a lookup field in my table which looks up a value in the same table. For example, a record will have a parent if there is another record with an ID equal to that specified in the "ParentID" field of the original record. Otherwise the record is a root level record.

I really don't want to make more custom objects for this task. However, when I try to create a new lookup custom field it won't allow me to choose the same table as the one I'm trying to create this field for. The reason for not going with multiple tables is because this way I can build a hierachy of infinite nodes similar to a tree data structure where each record may be the start of a new tree or be a branch of a tree.

Could someone please direct me?

Thanks in advance.
  • December 13, 2006
  • Like
  • 0
I'm trying to migrate some data from an existing db to Salesforce. I do this by creating Custom-Objects first. Within the existing tables there are document fields, but salesforce doesn't allow creating document fields (BLOB). Am I supposed to use the Documents object? or there is some other way of building a custom-object for documents and build relationships.

Any help is appreciated.
  • November 17, 2006
  • Like
  • 0
Does anyone know how the relaltionship between Cases and Solutions is implemented in salesforce?

Thanks in advance.
  • November 09, 2006
  • Like
  • 0
I have downloaded the content of tables (case,casesolutions & solutions) into my own tables. I thought that there is a one to many relationship between the case object and the solutions object through casesolutions object. however the ids in the casesolutions object associated with the CaseID and SolutionID fields do not match the CaseNumber and SolutionNumber in the case and solutions table.

Any help is appreciated.
  • November 09, 2006
  • Like
  • 0
Can someone out there kindly show me an example of how to use isDate and isDate2 functions from the Utils class? Somehow when I use it, it returns false all the time.

Thanks
  • September 28, 2006
  • Like
  • 0
are there any merge fields or a similar technique that I could use to download the sforceclient.js from the right server rather than hard coding the actual url in the html? its because when I login through the emea.salesforce.com my scontrols give xmlhttprequest premission errors.
  • September 27, 2006
  • Like
  • 0
I've been scratching my head for two days over this problem. One of our people here tends to access salesforce through http://emea.salesforce.com URL. Logging in through this URL results in IE7 rc1 and Firefox 1.5.0.7 crash when ever I want to load any of my S-Controls. IE returns "permission denied" and "Uncaught exception: Permission denied to call method XMLHttpRequest.open" for firefox.

Has anyone else had this problem?
  • September 21, 2006
  • Like
  • 0
I get this error when I call the sforceclient.create function with my array of records: "The system cannot locate the resource specified".

From what I read on the web, it has to do with incorrect path to the xml file. Has anyone else had this issue? BTW I'm testing my scontrol on the local machine and not on the salesforce yet, would this have anything to do with the problem?
  • September 17, 2006
  • Like
  • 0
Looking at the the toolkit documentation I only see the return type as an array of SObject or a soap error. I can't find the definition of the SObject so then my assumption is that it must be a simple array. I can detect the soap error without any problem, however I dont know what to do with it when its not a soap error. Does anyone else know what functions are available on this type?

Message Edited by Arman on 09-13-2006 12:10 AM

  • September 13, 2006
  • Like
  • 0
Could someone please explain to me why I can't stop this message in Firefox: uncaught exception: Permission denied to call method XMLHttpRequest.open

I've tried the solution that everyone here suggests (sforceclient.apptype = sforce.application.type.firefox) and thats not helping either.

This is my code:

function scontrolmain(IsStatic)
{
   try
   {
       sforcecleint=GetSForceClient();
   }
   catch(ExceptObject)
   {
       sforcecleint=null;
   }
   if(sforcecleint != null)
   {
       if(window.XMLHttpRequest)
       {
           sforcecleint.appType=GetSForceFFApplicationType();
       }
       loginresult=sforcecleint.login("xxx@xxx.com","xxx",null);
       showmessage(loginresult.toString());
       showmessage(sforcecleint.query("Select Id, LastName, FirstName From Contact",null).toString(null));
   }
   else
   {
       window.setTimeout(scontrolmain,100,"javascript");
   }
}


Message Edited by Arman on 08-27-2006 06:54 PM

Message Edited by Arman on 08-27-2006 06:54 PM

  • August 28, 2006
  • Like
  • 0
Hi There,

I am very new to the Salesforce Ajax toolkit. Could someone please explain to me what is the purpose of the Update method?

I thought maybe if you have say: "an id of a Contact" and then you want to get More Info about that contact what you do is you create a Contact Dynabean and set the id to it. Then put it in an array and pass it to the Update method. All great and works, but I can't figure out what the update does. This update method isn't there to update the content of tables is it? Because the Save method of Dynabean can decide between creating a new record or updating a record.

Thanks in advance
  • August 17, 2006
  • Like
  • 0
I'm trying to migrate some data from an existing db to Salesforce. I do this by creating Custom-Objects first. Within the existing tables there are document fields, but salesforce doesn't allow creating document fields (BLOB). Am I supposed to use the Documents object? or there is some other way of building a custom-object for documents and build relationships.

Any help is appreciated.
  • November 17, 2006
  • Like
  • 0
Does anyone know how the relaltionship between Cases and Solutions is implemented in salesforce?

Thanks in advance.
  • November 09, 2006
  • Like
  • 0
I tried to ask support, and they just said they don't support s-controls.

I created a new S-control that is just html. I'm using the xmlhttp object to fetch an rss feed. It works great if I create it as a link, but I want it as a section. My html is all nice and pretty, and trims the result set down to a maximum of 5 items, and its even formatted to match the HTML layout.

How do I create this as a component and add it to the accounts page layout? I basically want to do the same thing you can do to the home page.

Please help, I spent forever making this html / javascript and now can't do anything with it. Very frustrating.

Message Edited by caseyp on 09-26-2006 05:31 PM

  • September 27, 2006
  • Like
  • 0
I've been scratching my head for two days over this problem. One of our people here tends to access salesforce through http://emea.salesforce.com URL. Logging in through this URL results in IE7 rc1 and Firefox 1.5.0.7 crash when ever I want to load any of my S-Controls. IE returns "permission denied" and "Uncaught exception: Permission denied to call method XMLHttpRequest.open" for firefox.

Has anyone else had this problem?
  • September 21, 2006
  • Like
  • 0
I get this error when I call the sforceclient.create function with my array of records: "The system cannot locate the resource specified".

From what I read on the web, it has to do with incorrect path to the xml file. Has anyone else had this issue? BTW I'm testing my scontrol on the local machine and not on the salesforce yet, would this have anything to do with the problem?
  • September 17, 2006
  • Like
  • 0
All,
I've tried everything but Dynabean.save doesn't return anything.  I've tried sforceClient.create and it returns zip too.

I know that "set" and "create" calls are being made because the API complains if there is an invalid field on "sets" and the callback fires when I use "create" (I've tried both .save() and create() but neither works or returns anything in the saveResult.)

Here are the relevant code snippets.  Any help appreciated.

<script language="javascript" src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?browser=true"
            type="text/javascript"></script>
...

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

...

var renewalOppty = new Sforce.Dynabean("opportunity");
    try
    {
        renewalOppty.set("Name", document.OpptyForm.OpptyName.value);
        //renewalOppty.set("Description", document.OpptyForm.OpptyDesc.value);
        renewalOppty.set("Description", "My Description");
       renewalOppty.set("Type",document.OpptyForm.OpptyType.value);
       renewalOppty.set("Amount", m_amount);
       renewalOppty.set("LeadSource", m_leadSource);
       renewalOppty.set("OwnerId", m_ownerId);
       
       var oCloseDate = new Date("12/31/2006");
       renewalOppty.set("CloseDate", oCloseDate);
       renewalOppty.set("StageName", m_stageName);
       renewalOppty.set("ForecastCategory", "Pipeline");
       renewalOppty.set("CurrencyIsoCode", "USD - U.S. Dollar");
       //renewalOppty.set("Country", "US");
       
       //var opptyArray = new Array();
       //opptyArray[0] = renewalOppty;
       saveResult = renewalOppty.save();
       alert(typeof saveResult);
        //sResult = sforceClient.create(opptyArray,dummy);
Could someone please explain to me why I can't stop this message in Firefox: uncaught exception: Permission denied to call method XMLHttpRequest.open

I've tried the solution that everyone here suggests (sforceclient.apptype = sforce.application.type.firefox) and thats not helping either.

This is my code:

function scontrolmain(IsStatic)
{
   try
   {
       sforcecleint=GetSForceClient();
   }
   catch(ExceptObject)
   {
       sforcecleint=null;
   }
   if(sforcecleint != null)
   {
       if(window.XMLHttpRequest)
       {
           sforcecleint.appType=GetSForceFFApplicationType();
       }
       loginresult=sforcecleint.login("xxx@xxx.com","xxx",null);
       showmessage(loginresult.toString());
       showmessage(sforcecleint.query("Select Id, LastName, FirstName From Contact",null).toString(null));
   }
   else
   {
       window.setTimeout(scontrolmain,100,"javascript");
   }
}


Message Edited by Arman on 08-27-2006 06:54 PM

Message Edited by Arman on 08-27-2006 06:54 PM

  • August 28, 2006
  • Like
  • 0

1. I was displaying Case data via the API and wanted to show the Solutions associated with a particular case.  I couldn't see anything about the Solution in the Case object or vice-versa.  I notice from the standard GUI that this appears to be a many-to-many relationship.  Thus, we need access to the MTM table to show these.  Any ideas/comments?

2. I remember before seeing something about putting your knowledgebase (your solutions) online in a searchable format for your customers.  What would you recommend as the best way of doing this?  Is there a way to do this via the API?  Is there a traditional (i.e. non-API) method for doing this?

THANKS!!