• djordan
  • NEWBIE
  • 0 Points
  • Member since 2003

  • Chatter
    Feed
  • 0
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 14
    Questions
  • 16
    Replies

I'm pulling records from an external web service into a visualforce list. Users can select one or more records to be inserted into salesforce.com.

 

I would like to add a feature so more information is shown when a user hovers over a record. There's quite a neat JS solution here http://www.nicolashoening.de/?twocents&nr=8 but it doesn't work when I emebed the code in my VS page.

 

Is there a way to do this?

  • September 17, 2009
  • Like
  • 0
Dear community,

I’m using the Ajaxtools scontrol developer tool which is very handy, but am having trouble with some dojo (0.4.x) code which constructs a tree of groups. I’m having some trouble getting a handle to click events on TreeNodes.

What I want is simple: If the user clicks on a node, then call a function called “busiessLogic”. If they click on the same node, then call the same function again.

Here’s the code.
// Make the tree & root node
tree = dojo.widget.createWidget("Tree", {selector: "tSelector" });
document.getElementById("tree").appendChild(tree.domNode);
rootNode = dojo.widget.createWidget("TreeNode",{title: "Groups", widgetId: “rootOfAllNodes”});

// Now add the 1st level nodes
while(yada-yada)
...
   groupNode = dojo.widget.createWidget("TreeNode", {title: gName, widgetId: gId});
   rootNode.addChild(groupNode);
..
 
To get a handle on the click event, I have tried 2 approaches but have issues with both
1) Subscribe to the nodeClicked event:
dojo.addOnLoad(function()
{
    dojo.event.topic.subscribe("nodeClicked", function(message){ busiessLogic(message.node.widgetId); });
});

This works, in that if the user clicks on the node, then busnessLogic() is called
BUT IF THE USER’S NEXT CLICKS IS ON THE SAME NODE, THEN NO EVENT IS GENERATED.

i.e. If they click on Node A then node B and then Node A again, all is well. If they click on Node A, then Node A again, the 2nd event is lost.

2) Connect to the event. I tried variations on this but can’t get any of them to work at all
dojo.event.connect(groupNode, "onclick", "nodeClickCallback");
dojo.event.connect(groupNode, "onClick", "nodeClickCallback");
dojo.event.connect(groupNode, "onClick", nodeClickCallback);
dojo.event.connect(groupNode, "onClick", nodeClickCallback(myWId));
...
function nodeClickCallback(nodeId) {return function(nodeId) { busiessLogic(nodeId); };}
 
 
Any help would be greatly appreciated.

David

 

 

If you try to create a standard object record (account, contact etc..) specifying an inactive ownerId, the API complains loudly and the record is rejected. This is fair enough.

If you try to create a custom object record specifying an inactive ownerId, then the API happily creates the record returning an ID. I would prefer it to complain and reject the record.

Is this a subtle design feature of API 4.0?

Does anyone know of a tool which takes an Enterprise WSDL and creates a DB schema or set of create table scripts?

 

 

Over the past week, I've been getting intermittent "Connection reset by peer" errors while querying contacts.

2004-04-13 15:42:46,002 INFO  CaIntegration.CaIntegration doIntegration (CaIntegration.java:777) - Found a total of 12017 records in contact
2004-04-13 15:42:55,241 INFO  CaIntegration.CaIntegration manageInsertOrUpdate (CaIntegration.java:621) - About to query sforce for more info about records#0 to 199(200)
2004-04-13 15:43:32,639 INFO  CaIntegration.CaIntegration manageInsertOrUpdate (CaIntegration.java:633) - Adding data to the DB
...

2004-04-13 15:44:13,486 INFO  CaIntegration.CaIntegration manageInsertOrUpdate (CaIntegration.java:621) - About to query sforce for more info about records#600 to 799(200)
2004-04-13 15:44:13,862 ERROR CaIntegration.CaIntegration doIntegration (CaIntegration.java:820) - Failed to transfer data for entity contact because of error:
com.salesforce.common.exceptions.IntegrationException: Failed to query sforce records: com.salesforce.common.exceptions.SforceException: Cannot retrieve data from contact because java.net.SocketException: Connection reset by peer: Connection reset by peer
Attempting to recover...
2004-04-13 15:44:13,968 INFO  CaIntegration.CaIntegration cleanup (CaIntegration.java:137) - Connection to sforce closed

 

The line which throws this exception is:

                sobjects = binding.retrieve(fieldList, entityName, idList);

Similiar queries to account doesn't result in any issues. I'm using Java 1.3 (for deployment compliance reasons) with SOAP API 2.5.

 

Has anyone else seen this?

 

Hi,

I'm writing a JSP and an sforce control. I'd like to pass the account recordTypeId and user profile in via the WIL to save hitting the API twice for performance reasons. This is a particular concern for the sforce control.

Would it be possible to expose these fields via the WIL?

Cheers,

D.

 

 

API 2.0 supported "deleted" and "modified" query scopes.

I've hacked the "modified" scope with "select id from foo where systemModstamp > lastPollDate" but I can't see a way of getting at deleted records' IDs.

Does this functionality exist in API 2.5?

I had trouble getting an update to work (SOAP API 2.5) as I kept getting the error "Id not specified".

I tracked the problem down to specifying [id]... instead of [Id]...

However the result of a successful update has [id]...

 

It's a minor problem, but can be frustrating.

D.

I am writing a JavaScript based sControl to extend the functionality of accounts. I use a custom object to relate to accounts by storing the account IDs in a custom object field

I would like to have a query similiar to:

select c.fieldList from customObject c, account a
   where c.parentAccountId = a.id and a.country = someCountry

An alternative would be:

select fieldList from customObject
   where parentAccountId IN (select id from account where country = someCountry)

Since server side joins aren't available I'm faking this as:

String ids[] = select id from account where country = someCountry
select fieldList from customObject where parentAccountId = id[1] OR parentAccountId = id[2] OR ... parentAccountId = id[n]

It is possible to have n ~ 1000.

We considered duplicating the country field value in the custom object, but this value may be changed by users modifying the account record via the UI. Unless there is some way of triggering the update of the account.country field to update the customobject.country, or getting the user to manually update the value via a WIL, we cannot rely on the custom object to hold accurate information. (It may be possible to have a daemon process running around to compare the two values and fix any synchronisation issues, but then we introduce the problem of where to host this daemon: sControls are no longer an option)

 

What is the maximum length for the query string?

Is there a limit on the number of logical operators that can be applied to a query? Will rate limting make this query unworkable?

Is there a better way of doing this?

 

Cheers,

David.

Page 43 of the API 2.0 documentation states:

"During an inset or update, the sforce API verifies wheter the status field value specified in the call is a valid campaign member status for the given campaign. ... If the specified status value is not a valid campaign member status the API assigns the default campaign memeber status ... "

Is there any way to find the list of valid campaign member status fields for a specified campaign via the API?

 

D.

  • September 16, 2003
  • Like
  • 0

Is it possible to associate a note or attachment with a lead?

The SForce ERD shows the "parentId" field relates notes & attachments to opportunities, cases, solutions, campaigns, contacts & accounts but leads do not appear on the diagram.

 

 

D.

 

Is it possible to pass the system timestamp via a web integration link paramater or is this only available via an API call?

Is it possible to access competitor information via the API? Do competitor IDs start with '00J'?

 

Is there any documentation on the values returned by the rpcClient.execute() method?

Calls to different operations return different types. For example, a call to global describe returns a Hashtable which contains a key "types" which has is a Vector of Strings. A call to sfdc.query returns a Vector of Hashtables. Some of the values in these Hastables are Strings and other are more Hashtables. I found the easiest way to find out what result to expect was to use a debugger to drill down into the data structures.

Similarly, constructing the call paramaters without some specific Java documentation was initially a bit hit and miss.

 

David.

Is it possible to associate a note or attachment with a lead?

The SForce ERD shows the "parentId" field relates notes & attachments to opportunities, cases, solutions, campaigns, contacts & accounts but leads do not appear on the diagram.

 

 

D.

 

Let me first say that this sounds like a great addition to SFDC. My question is where do I begin in testing this new language? I have access to a SFDC preview org. Am I missing something? Do I save it as an s-control? I have read through the documentation but seemed to have missed this starting point.
 
Thanks!
does anyone know if it's possible to query (via the sforce connector or some other way) all contacts whose addresses dont match their associated account addresses?

any help would be much appreciated

thank you

Joe

You are welcome to download a preview version of the OpenAccess ODBC Driver for Salesforce.com. It is available at:

http://www.OpenAccessSoftware.com/support/SalesF-Files-Index.asp

The preview version allows READ access (SELECT) from Salesforce. It will expose all the objects you have acess to, including any custom objects/fields you have added. Please try it out and give us your feedback.

Using the OpenAccess ODBC Driver for Salesforce allows any application or development tool that is able to access data from databases like SQL Server and Oracle to access your data at Salesforce.com.

OpenAccess Team
http://www.OpenAccessSoftware.com

I'm still using the XML RPC API and I would like to find out what encoding my server is configured for. I noticed in SOAP there is the concept of a describeGlobal. Does anyone know the equivalent in the XML RPC api? Does anyone even know how to get a copy of the documention for XML-RPC anymore? I can't seem to find it anywhere.
  • December 03, 2004
  • Like
  • 0

If you try to create a standard object record (account, contact etc..) specifying an inactive ownerId, the API complains loudly and the record is rejected. This is fair enough.

If you try to create a custom object record specifying an inactive ownerId, then the API happily creates the record returning an ID. I would prefer it to complain and reject the record.

Is this a subtle design feature of API 4.0?

here is the soap message that I sent:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/ XMLSchema-instance">
 <soapenv:Header>
  <ns1:SessionHeader soapenv:mustUnderstand="0" xmlns:ns1="SoapService">
   <ns2:sessionId xmlns:ns2="urn:enterprise.soap.sforce.com">0kGvdc1oBLNSNwZYAad2z9KdIs_lIgFRIzhnzK6Tp.a2s5ZHXqHEkbo.fAWCNvmYlNiKBwpEXJ3SNDM6LQ6h_vbtzKggVlhL</ns2:sessionId>
  </ns1:SessionHeader>
 </soapenv:Header>
 <soapenv:Body>
  <create xmlns="urn:enterprise.soap.sforce.com">
   <sObjects xsi:type="ns3:Account" xmlns:ns3="urn:sobject.enterprise.soap.sforce.com">
    <ns3:Name>test08261045</ns3:Name>
    <ns3:BillingStreet>test08261045</ns3:BillingStreet>
    <ns3:BillingCity>test08261045</ns3:BillingCity>
    <ns3:BillingState>test08261045</ns3:BillingState>
    <ns3:BillingPostalCode>test08261045</ns3:BillingPostalCode>
    <ns3:BillingCountry>test08261045</ns3:BillingCountry>
    <ns3:ShippingStreet>test08261045</ns3:ShippingStreet>
    <ns3:ShippingCity>test08261045</ns3:ShippingCity>
    <ns3:ShippingState>test08261045</ns3:ShippingState>
    <ns3:ShippingPostalCode>test08261045</ns3:ShippingPostalCode>
    <ns3:ShippingCountry>test08261045</ns3:ShippingCountry>
    <ns3hone>test08261045</ns3hone>
    <ns3:Fax>test08261045</ns3:Fax>
    <ns3:AccountNumber>test08261045</ns3:AccountNumber>
    <ns3:Website>test08261045</ns3:Website>
    <ns3:Sic>test08261045</ns3:Sic>
    <ns3:TickerSymbol>test08261045</ns3:TickerSymbol>
    <ns3escription>test08261045</ns3escription>
    <ns3:Site>test08261045</ns3:Site>
   </sObjects>
  </create>
 </soapenv:Body>
</soapenv:Envelope>

 

here is the response that I received:

 

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
 <soapenv:Body>
  <soapenv:Fault>
   <faultcode>soapenv:Server.userException</faultcode>
   <faultstring>common.exception.ApiException: Must send a concrete entity type.</faultstring>
   <detail>
    <sf:fault xsi:type="sf:InvalidSObjectFault" xmlns:sf="urn:fault.enterprise.soap.sforce.com">
     <sf:exceptionCode>INVALID_TYPE</sf:exceptionCode>
     <sf:exceptionMessage>Must send a concrete entity type.</sf:exceptionMessage>
    </sf:fault>
   </detail>
  </soapenv:Fault>
 </soapenv:Body>
</soapenv:Envelope>

 

 

what did I do wrong here?

  • August 26, 2004
  • Like
  • 0

Here is my situation:  I am trying to data replication with SForce and our App.  I've created a class that will poll SForce for data and while unit testing I came across a problem.  I'll try to explain it as clearly as I can:

1-I programatically create an Account object during the set up of my JUnit test case.  This is the fixture I am trying to retrieve when I do the subsequent getUpdate call.

2-After the Account is created, I then poll SForce for changes.  The start time is my last successful poll time, which is set prior to creating the account object, and the end time is the current time.

3-I have observed that the Account is indeed created by pausing the debugger, confirming the Account is present in the UI prior to making the getUpdated call, then continuing on to make the getUpdated call.

My problem is that even though the Account is created, it is not retrieved by the FIRST call to getUpdated.  If I wait a minute, the Account is retreived by the getUpdated call.  Is the fact that the seconds are ignored causing me to miss the insert I just made?  And I guess that begs the question, are the times passed to the getUpdated method inclusive on both ends?  If they are, and the seconds are ingnore, then if the insert is one millisecond after the start time, they should be the same minute, and the Insert should be retrieved, correct?

I apologize if I'm being unclear, but I can't solve this problem.  I'm also curious why you made the call to ignore the seconds.  Doesn't that introduce gaps or problems with polling for data changes?

Thanks in advance,

Eric

Hello..

I m trying to get the complete list of feilds ( member variables) associated with an Object in Salesforce.

com.sforce.soap.enterprise.Field[] fields = dsor.getFields();

where dsor is of type com.sforce.soap.enterprise.DescribeSObjectResult          

This call does not return every field associated with the object. (It returned only 140 /155) . The objects that were not returned were a mix of both the custom and default fields and not even bounded by the datatype ( mix of picklist and Integer .. etc) or ownership.

Am I missing something. Do we have any other API call to return all the fields...

Thank you,

Chitra

 

Hi all,

Is there a scheduled maintenance / downtime for Salesforce servers? ( API 2.5) ? The reason I ask is that my client runs fine during the daytime i.e. run from command line. While it fails when scheduled to run at night say 2:00am?

Can anyone shed any light on this??

My program generates messages like this: (ofcourse nothing to do with SalesForce) but still something to look at:

Remote Exeception error in login 
nested exception is:
java.net.SocketException: Connection reset

 

Zer0frequency

 

Ok, here is the problem I'm having.  I run the following query on Account table:

 

select Name, Id from Account where Name='O'Neill, Eric 19046894'

Am guessing that the problem arises because of the single quote after O.  I just wonder how you guys dealt with this problem...  The number is an ID from my DB.

Thanks for your help.

Lukasz

  • February 12, 2004
  • Like
  • 0

I am writing a JavaScript based sControl to extend the functionality of accounts. I use a custom object to relate to accounts by storing the account IDs in a custom object field

I would like to have a query similiar to:

select c.fieldList from customObject c, account a
   where c.parentAccountId = a.id and a.country = someCountry

An alternative would be:

select fieldList from customObject
   where parentAccountId IN (select id from account where country = someCountry)

Since server side joins aren't available I'm faking this as:

String ids[] = select id from account where country = someCountry
select fieldList from customObject where parentAccountId = id[1] OR parentAccountId = id[2] OR ... parentAccountId = id[n]

It is possible to have n ~ 1000.

We considered duplicating the country field value in the custom object, but this value may be changed by users modifying the account record via the UI. Unless there is some way of triggering the update of the account.country field to update the customobject.country, or getting the user to manually update the value via a WIL, we cannot rely on the custom object to hold accurate information. (It may be possible to have a daemon process running around to compare the two values and fix any synchronisation issues, but then we introduce the problem of where to host this daemon: sControls are no longer an option)

 

What is the maximum length for the query string?

Is there a limit on the number of logical operators that can be applied to a query? Will rate limting make this query unworkable?

Is there a better way of doing this?

 

Cheers,

David.

Please note there is an omission in the API 2.5 documentation concerning SOQL and LIKE.

 

The documentation is missing description of the LIKE keyword, which as in the case with SQL, allows wild card searching of text fields.

 

For example:

 

select id, firstname, lastname  from lead where lastname like 'Smith%'

 

Will match all last names starting with Smith.

 

select id, firstname, lastname  from lead where lastname like 'Smith_'

 

Will match all last names starting with Smith up to 1 additional character.  (IE Smiths will match, but Smithson will not.)

 

The documentation will be updated soon to reflect this feature.

  • December 04, 2003
  • Like
  • 0

Hi,

I am runing Axis demos (java). I  did update first and then did query by Filter.

My filter is lastModifiedDate is "less than" end date which is current time and "greater than" start date which is current time - 30 second.

I noticed (I tried many times)  that even the lastModifiedDate is between the current time and current time - 30 second. query will not get the updated object. but if my start date is current time - 30 second - 60 second. I can get the object if I do query by Filter within 30 second after I did update.

current time - 30 second - 60 second <lastModifiedDate < current time

So why need 60 second .

I call get_server_timestamp to get server time and it is same as my local time (GMT)

I am thinking this many days and don't know why.

 

 

 

  • August 18, 2003
  • Like
  • 0

To query using the updated or deleted scope it says you need to have "replicate: access to the entity type.  How do you enable the Database Replication feature? Is it possible to do so under the developer edition?  Is it possible to do so through the API?

-Pawan

  • July 16, 2003
  • Like
  • 0

Hi there,

We would like to run a local copy of the database to extend our report capabilities. Does Salesforce support any means of data replication?

We have MS SQL Server running locally. We would like to replicate the data to this server.

Thank you in advance.