• pierre
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 9
    Questions
  • 10
    Replies
Problem: I'm designing a nice powerful apex code or s-control, but it's manipulating the record and I need to update the user on what the code is doing. For instance, I need to tell him/her that the code is updating the opportunity stage because of so and so..

Now how can I send information back to the user?
1) I can send an email (apex email api) to the user: not the best solution
2) I can dynamically display a portion of the page with visualforce, but it looks very long and painful to develop, see http://wiki.apexdevnet.com/index.php/Visualforce_DynamicEditPage
3) I can display a popup in javascript, but only if I'm writing an s-control (can apex dyamically run javascript? )

In an ideal world, I could code in one-line a dynamic information popup with minimal features: disappearing after one click, automatic snapshot of the page included in the popup, easy control of the text message font and color, maybe some Flash toolkit (Flash in SFDC pages = admiration from the users), something easy to code...
I'm doing a simple async query:
        sforce.connection.query(str,{onSuccess : nearbysuccess, onFailure : nearbyfailure, timeout: 40000});

the query (str) works, I tested it with the sforce explorer.

AND results are returned, the success callback is called BUT 'nearbyfailure' is ALSO called !!!!
the error returned has the following Javascript attributes:
    name: "Error"
    number : -2147024809
    description: "Invalid argument."
    message: "Invalid argument."

What is going on?
I am creating an inline s-control to display some additional values for a custom object from a related object, and I want it to look like part of the regular page.  I'm using the example from here:
 
 
But the bPageBlock class puts a border on the section, that I don't want.  I just want the background to be the same color as the rest of the page. 
 
the beginning of the html I'm using looks like this:
 
var output =  "<div class='bPageBlock secondaryPalette'>";
output += "<div class='pbBody'>";
output += "<DIV class=pbSubsection>";
output += "<table class='detailList' cellpadding='0' cellspacing='0' border='0'>";
 
Thanks in advance, I know this is a total beginner-question.
 
 
 
When Overriding a button, any subsequent click to the button operates no longer just one request to the sfdc servers (request to display the new/edit/delete/... page) BUT 2 requests: one for the s-control that overrides the button, then usually one for the original page.

Is there another way?

For instance, is there a way to place the s-control code within the sfdc servers (in a Apex-like manner) so that those are executed by the server instead of the user browser? It doesn't make much sense, you might say, because it's most often javascript (and not Apex code), but I think most of what most people want to do in overriding buttons is server-like code, not user-interfacing code.

Or is there another way to shorten the response time between the click and the page return, apart of asynchronous operations?
For instance is there a way that the page refresh (for instance to a "URLFOR(Action...." or to a hardcoded "../e/00..." type of URL) be the FIRST operation in the s-control?
The Excel connector stop with a dialog box whenever it hits an error, this is annoying when performing large queries.
For instance, I'm querying the account type of ~2000 records. The query stops each time it hits a deleted Id, which forces me to rearrange the file and rerun the query each time. The error I get is:
 
  salesforce: update() <<<---- this is weird, since I'm doing a query, pobably just a UI error
  invalid Range, missing data type, or other error, type is: Account Object required
 
Is there a possibility to remove those dialog boxes and unblock query processes?
Best would be to insert the error in the cell instead of displaying an error box.