• daroz
  • NEWBIE
  • 100 Points
  • Member since 2004

  • Chatter
    Feed
  • 1
    Best Answers
  • 1
    Likes Received
  • 0
    Likes Given
  • 16
    Questions
  • 241
    Replies
We are using the google maps and they work for the most part. Some queries will pull contacts from our db but fail to map. When I look at the diag window I see a message similar to the one below.........

"Skipping geocoding of Ben Frnaklin due to error from google scraping."

I have looked at the contacts that fail and don't see anything different about them. They all have the correct fields of info with no blanks or wierd characters. I have even tried to copy the info out of SF and directly into the google maps linkm, and it maps correctly! Is there any way to see additional info about the scraping process or figure out what is wrong? The contacts that fail seem to be consistent but unremarkable.

Thanks!!
I've promised to post a how-to kind of document after the Winter '06 release, but my time is rather short at the moment. I'll get to it eventually with some example, in production code, but it won't be for a bit yet... Given the number of posts here and elsewhere asking how to do this I thought I'd give some of you a head start. But first a small disclaimer:


WARNING: READ THIS FIRST

THIS TECHNIQUE IS NOT SUPPORTED BY SALESFORCE.COM -- IF YOU HAVE ANY PROBLEMS, DON'T EVEN BOTHER CALLING
READ THIS ENTIRE POST BEFORE ATTEMPTING THESE CHANGES. If you make a mistake you may render your page layout unuseable and uneditable. Possibly even undeleteable.

USE AT YOUR OWN RISK


You can modify actions in the UI on the following pages:
Any Standard or Custom Object Display, Edit, or Print Preview Page, and the user's Home Page

You cannot modify the UI using this method on report pages, the setup pages, and probably several other locations I can't think of at the moment.


What you will need to do is to write some JavaScript code that will execute on the client-side that will locate using the browser DOM the elements you want to edit. For example I change the destination of a "New" button on one of my related list entries. Because there are multiple "New" buttons on the page you will need to check the SFDC-provided destination of the link. It so happens that the related list is a custom object who's id's start with "a00", so I check the link for the string "/a00" and then alter accordingly.

Once you have your JS code you need to get it to execute on the browser.

First create a new Custom S-Control in setup. Give it an appropriate name, and paste your JS code you've written into the "HTML Body" section. Don't include any HTML in the JS, but do include the HTML/JS comment delimiter open/closings on your code. Save your control and view it. You should have a URL that starts with https://na1.salesforce.com/01N... Take note of the object ID (the 01N...
part) and continue on...

If this code will execute on the home page you'll need to have the "Messages and Alerts" home page component enabled. Edit it, and create a HTML script tag with the src url:

/servlet/servlet.Integration?lid=01N...&enc=UTF-8

Replace 01N... with the object ID you saved above.

That's pretty easy, and really doesn't push the limits too far, but how do we get the code to execute on the individual object pages? Ah ha...

WARNING: Again, this is not supported by SFDC, and if done improperly could break your page layout(s). SFDC may decide this is a bug and patch the system, breaking this method. Proceed at your own risk.

In the Page Layout you can give section headers custom names (with some exceptions). These section names are allowed to be very long, and allow you to use unfiltered HTML. One word of caution, when you make these changes below, use a copy of your page layout. If you make a typo, like forgetting a less then or greater then symbol you will break the HTML on the page and very likely break the ability to delete the section or edit it further. You have been warned!

1. After cloning your page layout, edit it and edit a section name. 2. If your section name before was "Section" insert an HTML script tag in front or behind the section name in the same format as the one above in the HTML message box. 3. Save your layout.

Some cautionary words - again, do this at your own risk, but the abilities this leaves us are seemingly unlimited. Do note that straight JS code will execute as the page is loading, not after it completes. You'll need to hook an on-load event to the page to delay execution until after the load is complete.

I'm sorry I couldn't post the actual script tags and whatnot but the forum tends to actually render those as HTML, not as text.
  • January 12, 2006
  • Like
  • 1
I'm trying to use Axis 1.2.1 in an Applet. The applet will be querying the API and printing an invoice. (Definately something that has to be done client-side.)

I've been wrestling for the last few days trying to get Axis to play nicely in an applet. (Yes, I've signed _all_ the JARs.)

I've gotten it to work (mostly) except two things:

1. Axis tries to load the .class files from the webserver the .jar is hosted on _before_ it bothers to look in the JAR file. (Given that, at least for now, all the Axis classes are unjared and regared into the signed jar that's deployed it's ALOT of classes -- and makes things SLOW).
2. I get an odd "Exception in thread "Thread-8" java.lang.ClassFormatError: Truncated class file" error late in the process.

I've managed to get past the other odd ClassLoader Axis problems, and man is this a PITA!
  • July 09, 2005
  • Like
  • 0
Anyone have any luck getting WSDL2Code to generate stubs that compile with either the Enterprise or Partner WSDLs?
  • July 09, 2005
  • Like
  • 0
FYI for those running Axis 1.2 - Axis 1.2.1 has been released, with some minor bugfixes. I haven't encounted any of the problems in my environment here but you never know...
  • July 01, 2005
  • Like
  • 0
... sorta

http://cvs.sourceforge.net/viewcvs.py/sforce-app-dl/

(Note: They haven't officially announced it yet, and that code may be incomplete -- I haven't tried it yet.)
  • June 14, 2005
  • Like
  • 0
Anyone out there using Axis 1.2 / Axis2 M2 and making Async calls to either the Enterprise API or the Partner API?
  • June 14, 2005
  • Like
  • 0
Stumbled on this today doing some proxy testing....

https://na1.salesforce.com/servlet/servlet.ReportList

(Change na1 to match your instance name -- you need to have already logged into the system before going to this URL)

Better then screen scraping, but still leaving some things to be desired.
  • June 06, 2005
  • Like
  • 0
(Ok, the title could use work, but who am I, Steven King?)

In the process of preparing to migrate a bunch of integrations away from .NET (my client is going to be switching to Firefox with or shortly after the new release) I began work in earnest converting things to Java, and Axis. Most of the simple stuff came across fairly easily. Printing is another story entirely, but performance became an early problem.

Async calls in Axis seem to be _very_ undocumented. In fact I couldn't find any examples at all, and only a small directory of source code in the Axis source to guide me. After putting Async calls on the back burner I turned to SOAP compression. Before I get into my tale let me set some background. I hate modifying 'stock' code, and would much rather extend and override it where I can. The SFDC technote, while I'm soure it would work, did exactly this. (Seeing as I can't control _every_ machine that would get these applets deployed I can't depend on a modified Axis distribution.)

Off I went looking for solutions to the SOAP compression problem. Why neither .NET or Axis allow for (at least) receiving a gzip-encoded response is beyond me. Nonetheless Google is your friend and I quickly found this library for Axis SOAP compression... And there was much rejoicing.

That was until I actually tried it. Problem is that library makes a call to close the outbound socket. While normally not a problem, the Java SSL sockets really don't like this. In fact it pukes up a very nice exception for you. I even went as far as to disassemble the library and comment out those pieces of code. That didn't get far either as it appeared to just hang at that point waiting to read from the server.

From time to time you find a problem that just kicks your ass. The human spirit triumphs and you get determined to kick it's ass back into submission.

Two days later, holding my sorry and very disfigured ass after getting it handed to me, repeatedly, by SSL sockets in Java, I had pretty much rewritten the Axis HTTPSender routiene. I'd like to say it was all working quite well now, but I can't, in fact it had gotten about nowhere. Invariably what would work with SSL would fail without, or vice versa. Time to try another angle.

One of the stock Axis transports uses the Apache Commons HTTPClient library. Oh joy of joys, perhaps it knows how to do gzip encoding? Nope. Bzzt, sorry Hans, wrong answer...

But there just might be a way to do it. Another 8 hours later I find this interesting message howing how the HTTPClient PostMethod can be abstracted and overridden to allow for receipt of gzip encoded data. Not bad. Halfway there.

Copy and paste that into a class in Eclipse, and modify the one line in org.apache.axis.transport.CommonsHTTPSender.java, making it into my own class int he process, and vola it works!

The moral of the story: What a $%#@ PITA. And I still haven't even gotten to async calls yet...

If anyone is interested in my .java files I used to get here, or the ones that are FUBAR, let me know and I'll be happy to forward them over. My email address should be visible in my profile.

I'm going to wait a few days and give another crack at outbound compression and modifiying what I've got working so far... If anyone wants to chip in, let me know.
  • June 03, 2005
  • Like
  • 0
I was surfing my RSS reader and found this entry in the Sforce blog about the Data Loader.

While I don't have a need for it at the moment something caught my eye:

"You can also consider using the Sforce Data Loader since it: ... Bypasses the writing to the recent items list"


Benji/Simon/Dave... Is this an Sforce 6.0 feature, or something undocumented in 5.0? (If the latter mind spilling the beans?

(Side Note: If it's an Sforce 6.0 feature it would help explain why it's not going to be released until Summer '05 is out, for those wondering that...)
  • May 20, 2005
  • Like
  • 0

I have a growing number of sForce controls that need access to several different objects int he system. Currently my largest is at about 12 objects. In order to adequately enter the "Select ... From" SOQL text I need to be able to determine what, if any, fields each user has access to. This necessitates about 12 calls to DescribeSObject() to get that metadata.

There is (almost) nothing more painful then sitting watchign the status bar crawl through those 1/12.... 2/12... 3/12... Of course hearing the users complain is actually more painful, but I digress.

Working in .Net I am now making those calls Asynchronously to help the problem along.

My question is this:

Is there a Best Practices document that talks about the maxinum number of concurrent requests we should have outstanding?

Message Edited by daroz on 11-03-2004 04:22 PM

  • November 03, 2004
  • Like
  • 0
... I'm asking this same question of my Customer Success Manager as well, but wanted to float the balloon to the community-at-large as well.

I'm currently about to deploy a handful of embedded sforce controls in salesforce. Several of them would likely persist on the users screen for some time. As they are passed the SessionID by way of the merge field they have no need to login.

The problem comes when the SessionId nears expiration. The Web UI can simply refresh the page and get a new cookie, but doing so would reset the scontrol. While this is bad it gets worse. What happens when a SessionID actually expires between data capture and save? The user would be forced to enter his user/pass to get a new SessionID just to continue working in the control because there is no way for the control to obtain the user credentials from the system.

Also without knowing when the SessionID will expire we have no way to warn the users to complete their work, or take any other steps in advance of the expiration.

I'm curious to know how people handle not knowing the session expiration and dealing with it in a semi-persistant control.
  • September 29, 2004
  • Like
  • 0

Anyone know what this board is for:

http://forums.sforce.com/sforce/board?board.id=intro

There's a few others, seemingly duplicates of these boards...

  • September 27, 2004
  • Like
  • 0

I've been trying to test the Archival process and am having some conflicting results with the API documentation (and information from one of the SEs)...

According to the API: http://www.sforce.com/us/docs/sforce40/sforce_API_objects_Event.html#wp1344166

Sforce archives activities according to the following criteria.

    • Events with an ActivityDateTime or ActivityDate value greater than or equal to 365 days old
    • Tasks with a Closed flag value of True and an ActivityDate value greater than or equal to 365 days old
    • Tasks with a Closed flag value of True, a blank ActivityDate field, and a create date greater than or equal to 365 days ago

    I've tried creating activities in my developer account dated back in 2001 and I cannot seem to get them archived (or what happens in the UI/API regarding accessability is incorrect). Can anyone confirm/deny the API docs and/or archival interval. (I was told it was nightly.)

    Thanks.

    • September 14, 2004
    • Like
    • 0

    Where should we submit patches to the sForce Explorer?

    -- Brian

    • August 30, 2004
    • Like
    • 0

    Just starting to work with the API and doing a field/table analysis to work on some integration work...

    A few things have poped up that aren't in the API documentation for 4.0 (at least the HTML view-online version anyway), and all refrence the Developer edition:

    1. "Approval" object is not in the API docs but available
    2. "BusinessHours" object is not in the API docs, it also appears as though the object should have only one record in it, but after adding that record it still describes as 'create-able'.
    3. "Note" Object API docs list it associates only to Attachment Contact or Oppourtunity objects. It shared relations with alot more then that I'm sure.
    4. "Organization" object is not in the API docs. (It also lists as 'create-able')
    5. "Queue" and "QueueMember" objects are not in the API docs

    Thanks,

    -- Brian

    • August 13, 2004
    • Like
    • 0

    I have a client who is evaluating Salesforce and is tasking me with the migration from his existing home-grown solution.

    Luckily I have the data from the home-grown app pulled out and semi-standardized. My problem is now importing it into Salesforce and maintaining the accuracy of the historical data.

    Simply put, as an example, each contact/account/oppourtunity record (they're the same thing) in his home-grown system has a series of timestamped notes.

    I've looked through the results of the describe object for the notes table and it does not appear that I can set the create/modified date property to match the actual timestamp of the note.

    While notes are truely problematic, expecially in the way he uses them to keep a cronological record, it gets worse with the actual account/contact/oppourtunity records.

    The last modified and created timestamps are used currently (and will be used) to drive workflow in the system based on the 'age' of the oppourtunity (think: how stale is it) and the last activity in it certain events get fired off.

    How can I get past this problem?

    • August 11, 2004
    • Like
    • 0
    I've promised to post a how-to kind of document after the Winter '06 release, but my time is rather short at the moment. I'll get to it eventually with some example, in production code, but it won't be for a bit yet... Given the number of posts here and elsewhere asking how to do this I thought I'd give some of you a head start. But first a small disclaimer:


    WARNING: READ THIS FIRST

    THIS TECHNIQUE IS NOT SUPPORTED BY SALESFORCE.COM -- IF YOU HAVE ANY PROBLEMS, DON'T EVEN BOTHER CALLING
    READ THIS ENTIRE POST BEFORE ATTEMPTING THESE CHANGES. If you make a mistake you may render your page layout unuseable and uneditable. Possibly even undeleteable.

    USE AT YOUR OWN RISK


    You can modify actions in the UI on the following pages:
    Any Standard or Custom Object Display, Edit, or Print Preview Page, and the user's Home Page

    You cannot modify the UI using this method on report pages, the setup pages, and probably several other locations I can't think of at the moment.


    What you will need to do is to write some JavaScript code that will execute on the client-side that will locate using the browser DOM the elements you want to edit. For example I change the destination of a "New" button on one of my related list entries. Because there are multiple "New" buttons on the page you will need to check the SFDC-provided destination of the link. It so happens that the related list is a custom object who's id's start with "a00", so I check the link for the string "/a00" and then alter accordingly.

    Once you have your JS code you need to get it to execute on the browser.

    First create a new Custom S-Control in setup. Give it an appropriate name, and paste your JS code you've written into the "HTML Body" section. Don't include any HTML in the JS, but do include the HTML/JS comment delimiter open/closings on your code. Save your control and view it. You should have a URL that starts with https://na1.salesforce.com/01N... Take note of the object ID (the 01N...
    part) and continue on...

    If this code will execute on the home page you'll need to have the "Messages and Alerts" home page component enabled. Edit it, and create a HTML script tag with the src url:

    /servlet/servlet.Integration?lid=01N...&enc=UTF-8

    Replace 01N... with the object ID you saved above.

    That's pretty easy, and really doesn't push the limits too far, but how do we get the code to execute on the individual object pages? Ah ha...

    WARNING: Again, this is not supported by SFDC, and if done improperly could break your page layout(s). SFDC may decide this is a bug and patch the system, breaking this method. Proceed at your own risk.

    In the Page Layout you can give section headers custom names (with some exceptions). These section names are allowed to be very long, and allow you to use unfiltered HTML. One word of caution, when you make these changes below, use a copy of your page layout. If you make a typo, like forgetting a less then or greater then symbol you will break the HTML on the page and very likely break the ability to delete the section or edit it further. You have been warned!

    1. After cloning your page layout, edit it and edit a section name. 2. If your section name before was "Section" insert an HTML script tag in front or behind the section name in the same format as the one above in the HTML message box. 3. Save your layout.

    Some cautionary words - again, do this at your own risk, but the abilities this leaves us are seemingly unlimited. Do note that straight JS code will execute as the page is loading, not after it completes. You'll need to hook an on-load event to the page to delay execution until after the load is complete.

    I'm sorry I couldn't post the actual script tags and whatnot but the forum tends to actually render those as HTML, not as text.
    • January 12, 2006
    • Like
    • 1
    Is there any way to keep IE from popping up this "Alert" when using an Scontrol?



    I tried putting the Scontrol in a popup window with no content around it at all... and still I received this alert...
    When I click "No" it still works, however it is quite annoying and no matter how much I try to explain it, my customers especially my financial sector customers are very nervous.

    -=Bryan

    Update
    I found out the line that's causing the alert to show up.
    It's the sforceClient.init(...)
    Also interesting is the order in which the coded alerts show up in.. their display order is denoted by the number at the beginning.

    Code:
    function initPage() {
      //Initialize the connection to salesforce.com by setting the sessionid and the
      //soap endpoint in the init call
      alert("1 initPage::before sforceClient.setLoginUrl"); 
      sforceClient.setLoginUrl("https://www.salesforce.com/services/Soap/u/7.0");
      alert("2 initPage::before sforceClient.registerInitCallback");
      sforceClient.registerInitCallback(startUp);
      alert("3 initPage::before sforceClient.init");
      sforceClient.init("{!API_Session_ID}", "{!API_Partner_Server_URL_70}", false); //this line throws the security alert
      alert("5 initPage::after sforceClient.init");
    }
    
    //=======
    
    function startUp() {
      alert("4 startUp");
    }

     

    Message Edited by BJames on 05-03-200611:03 AM

    I know I can't access the recycle bin via the API. However, is there a property on a lead that can be checked  via the API to see if a lead is in the recycle bin? When I query for leads, the leads that are in the recycle bin are returned.

    Thanks,
    Chad
    A former employee set up our Home page with a partner based 'Brought to you by' logo component on our home page. How can I remove it?  There's no s-control or component I can see in the Home page layout. Anyone know what to do?
     
    Thanks,
    -- Mark
    I'm planning on taking nightly back-ups from Salesforce.com into a database (SQL Server). I have a couple questions regarding the export process:

    1.   If I only want the deltas should I use the LastModified Date as the selection criteria to determine recenlty created or updated records in the last 24 hours?

    2.  Should I use Salesforce.com's server date/time value as a starting point for determining the above. If yes,  is it possible to do a select statement to get this value (outside of the SOAP getServerTimeStamp())?

    3.  Do folks generally convert the UTC date/time stamp to their local time zone before inserting the records?

    4.   If new fields are added (or maybe updated) should I consider dropping my back-up table and re-creating it to address this case?

    I'm sure there are other points I need to consider so I'm hopefully folks can provide some additional input.
    BTW, I'm planning on using Pervasive's Business Integrator to do the nightly exports.

    Thanks in advance
    Keith


    It's an easy fix, but I'm wondering if something changed with beta 3.3 to cause this or what... I wasn't having this problem on Friday.

    Thanks,
    -Zach
    • April 24, 2006
    • Like
    • 0
    Hi
    I guess that this is a quite common and simple problem but I cant find any easy way out.
     
    I'm trying to update an account with values from a description field on another object. Everything works just fin as loong as I dont use data that contains funny characters as "&", carriage returns and so on.  Tryign to update data with these values makes the script crash...
    I'd be really greatfull if anyone have a solution to this!
     
    Cheers!
     
    /Olof
     
    Script sample:
    function UppdateAccount() {
    var queryResult = sforceClient.Query("Select ID, Name, Description from Account where ID='" + s_AccID + "'");
    if (queryResult.getClassName() == "SoapFault") {
    alert(
    "Error Updating Account: " + queryResult.toString());
    }
    else {
    if (queryResult.size > 0)
    {
    if (queryResult.size > 0) {
    var account = queryResult.records[0];
    account.set("Description", s_ACText);
    queryResult.records[0] = account;
    var sr = sforceClient.Update(queryResult.records);
    try {
    if (sr.getClassName() == "SoapFault") {
    alert(
    "Error updating Account: " + sr.toString());
    }
    }
    catch (e) {
    if (sr[0].getClassName() == "SaveResult"){
    return(true);
    }
    }
    }
    }
    else
    {
    alert(
    "Couldn't find account, not updated.");
    }
    }
    }

    I'm trying to figure out what errors I need to handle in my application and  a question came up that "...is it possible for an async call to the query method to timeout"?

      I looked through the community and googled around and could not find much!

    -=Bryan


    • April 20, 2006
    • Like
    • 0
    Is there any way to integrate an scontrol to run a report and click the printable view button, without the user seeing the report being run.  I want to have a custom link that users click that runs a report.  I don't want users to be able to see the report as this will encourage them to alter the report (which I don't want).
     
    Basically an scontrol that runs a report (the user doesn't see this report) and then runs the printable view button to display the results in excel (the user would basically click the custom link, from the home page, then the excel file would be displayed).
     
    The information I want to dipaly is a customopportunity field and  a few standard opportunity fields.
     
    Is this possible?  How do I go about this?  Has anyone got any sample code?
     
     
    Hi, wondering if it's possible to create an s-control that:

    * initiates creation of a record (let's say an Opportunity)
    * sets the needed foreign keys
    * sets the Record Type
    * fills in certain fields in the form (amount and date, for example)
    * leaves the user in Edit mode with option to complete/commit or cancel

    If so, does anyone have an example they could point me to?

    I've seen the technique where the record is created & committed via code, then pulled up in edit mode.  But I'd prefer to give control back to the user before the rec is committed.

    Sorry if this is old hat - a quick search of the forum didn't turn up the answer.

    Thanks!
    Matthew
    • April 12, 2006
    • Like
    • 1
    Hello forum.
    I had seen some implementations when guys can extract data through API using specific report.
    Unfortunately I can't find Report object.... What objects should I query to get a resultset with data from previously created custom report.
     
    Thanks in advance,
    Yuri Gelman
    If I specify a batch size of 25 and then perform a query like "SELECT FirstName, LastName from contact", will I get the 25 most recently created contacts?

    If not, which contacts will I get? And if not, how can I query for the 25 most recently created contacts?

    Thanks,
    Charlie

    Message Edited by cwood on 04-05-2006 10:17 AM

    Message Edited by cwood on 04-05-2006 10:17 AM

    • April 05, 2006
    • Like
    • 0
    Hi folks - I have created several custom objects but have some outstanding questions. Here's a simple example. I create an object called "ComputerType". I create fields called UserId and ComputerType. The intent would be to use the SF userid as the primary key for this table and the ComputerType field to store what kind of computer that user has (model number or whatever).

    So then along with these two fields, I'd get the standard "Id" and "Name " fields created. I know the Id field is normally the primary key for an object, but in this case, I'd want to use UserId field. Is this a good approach? Basically ignoring the Id and Name and just using my custom fields?

    So if I wanted to do an upsert, could I use the UserId as the lookup field?

    I should mention that these objects will be manipulated by my app only and not used anywhere in the SF layouts so I don't nee any of that functionality.

    Ryan

    Message Edited by Ryan M on 04-04-2006 10:16 AM

    I'd really like to query reports from the API:

    1. Query the list of available reports (for example, to fill a drop-down)

    2. For a given report, query the columns and rows.

    I saw a screen shot from Got Campaigner that seems to indicate this is possible. Can it be done using either the partner or enterprise API? The API docs don't have any relevant hits when searching for Reports.

    Thanks!

    -- Mike

    Message Edited by Mike Sax on 06-22-2005 01:20 AM