• FinTech
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 7
    Questions
  • 15
    Replies
 I was wondering if anyone could give me guidance on the following.

I'm trying to compare two strings (two phone numbers). One from the document form and one from the Salesforce.com contact object. I'm just doing a document.getElementId("Phone").value != contact.get("Phone"...comparison...When I submit the system thinks the values are not the same when they are...How do you compare strings?
  • September 11, 2006
  • Like
  • 0
When I try to bind data to a VAR in Javascript I get null value. How do you handle nulls with the AJAX kit?
  • September 10, 2006
  • Like
  • 0
Another basic question. What is the best way to handle this issue?

I have made a custom HTML form? The form needs to update fields from a Contact object. I have a handle to the dynabean but I'm not sure how to handle the submit?

Should I parse the document.form.elements[] and hardwire the results into the dynabean?

I'm trying to use the bind method but this looks like it's used when you query the contact object first...
Any thoughts on the best way to get elements (like input fields) and update the contact object?

Message Edited by FinTech on 09-09-2006 05:33 PM

  • September 10, 2006
  • Like
  • 0
I'm trying update a checkbox on a custom object. However, when I call this from an s control I get blank window. Can anyone help here and tell me what I'm doing wrong?

<html>
<head>


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

var url="/email/author/emailauthor.jsp?retURL=/{!Loan_ID}&template_id=00X40000000mepA&p2_lkid={!Contact_ID}&p3_lkid={!Loan_ID}";

function redirect( )
{
parent.frames.location.replace(url);
}

function updateSentEmail(){
qr = sforceClient.query("Select Id, Renewal_Email_Sent__c From Loan Where LoanId='{!Loan_ID}'");
alert("Here.");
var flds = sforceClient.DescribeSObject("loans").fieldList;
alert("Loan fields are:\n" + flds);
alert("Query"+qr.toString());

}
updateSentEmail();
//redirect( );

</script>
</head>
<body>

</body>
</html>
How do you pass an ID to an sControl? I'm trying to figure out a way to know who the calling contact page is when invoking my sControl?

In a typical URL submit you pass the id via the url (ie. www.salesforce.com?id=[id]])...Is there a way to do this? I just need to know who the contact is that called the sControl?

hELP!
Is there a tutorial that explains the variouls parameters that can be passed in a URL?
I'm trying to validate the capability of this to be programmed. I need to invoke an email from an sControl. Once the sControl is invoked, the email editted and sent, the calling page (in this case a custom tab object) has a checkbox called "Email sent?". I want this checkbox checked and then the  page to close. Is this possible?
 I was wondering if anyone could give me guidance on the following.

I'm trying to compare two strings (two phone numbers). One from the document form and one from the Salesforce.com contact object. I'm just doing a document.getElementId("Phone").value != contact.get("Phone"...comparison...When I submit the system thinks the values are not the same when they are...How do you compare strings?
  • September 11, 2006
  • Like
  • 0
Dear All;
                     I have created one SControl using AJAX toolkit to fetch the data from salesforce database and to display it in tabular format.As soon as I select filters and click the show report button the query starts fetching data from the database.During the query run the page gets freezed.
                    Actually I want to show the progress bar when query is busy.I tried this using javascript timer,usuing table in marquee, and some ready made progressbars available on net; but each time whenquery starts running every progressbar stops its animation(Movement) as the whole page, freezes.
                    I even tried with using callback function.It oks well when I show progrss in a form of text(percentage).But for progressbar it fails as timer stops working.
                    Can anyone give me the solution with example because I tried all the options in my mind.
Small example with explaination will help me lot.
 
Thanks in advance
I'm trying update a checkbox on a custom object. However, when I call this from an s control I get blank window. Can anyone help here and tell me what I'm doing wrong?

<html>
<head>


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

var url="/email/author/emailauthor.jsp?retURL=/{!Loan_ID}&template_id=00X40000000mepA&p2_lkid={!Contact_ID}&p3_lkid={!Loan_ID}";

function redirect( )
{
parent.frames.location.replace(url);
}

function updateSentEmail(){
qr = sforceClient.query("Select Id, Renewal_Email_Sent__c From Loan Where LoanId='{!Loan_ID}'");
alert("Here.");
var flds = sforceClient.DescribeSObject("loans").fieldList;
alert("Loan fields are:\n" + flds);
alert("Query"+qr.toString());

}
updateSentEmail();
//redirect( );

</script>
</head>
<body>

</body>
</html>
How do you pass an ID to an sControl? I'm trying to figure out a way to know who the calling contact page is when invoking my sControl?

In a typical URL submit you pass the id via the url (ie. www.salesforce.com?id=[id]])...Is there a way to do this? I just need to know who the contact is that called the sControl?

hELP!
Trying to create a join  - yes I know there is no join capability currently - hence my struggle.  I've got a custom object represented as a lookup field on the account record. The field is not required and in fact may be null at times. I need to do the following;

Query the custom object based on some criteria, then based on the custom object 'Id' I need to then query and get the accounts associated with the custom object.

qr = sforceClient.query("Select Id, Name, Latitude__c, Longitude__c From SFDC_65_Building__c s Where  BuildingPostalCode__c = 'xxxx'");

I am assuming I would then create some sort of an array to hold the value of the Id's returned and then in turn run an additional query based on the id's (would love to use retrieve but not possible as I don' t have the account Id) so second query would be;

qr2 = sforceClient.query("Select Id, Name From Account Where customObjectField =" +arrayValue);

I can't figure it out however. Any help much appreciated.
I'm trying to validate the capability of this to be programmed. I need to invoke an email from an sControl. Once the sControl is invoked, the email editted and sent, the calling page (in this case a custom tab object) has a checkbox called "Email sent?". I want this checkbox checked and then the  page to close. Is this possible?
subject says it all
I have a custom object, it has about 25 checkboxes. I want to update the selected checkboxes accorinding to pressing on a link.
How can I do it?
 
a more specific detail:
cb's 1,2,3,4,5 need to be selected if custom link 1 is pressed.
cb's4,5,6,7 need to be selected if custom link 2 is pressed (uncheck the rest)
 
Anyone?
How do you set the Send Email Notification checkbox value in the Task object from within an scontrol?  I don't see the field defined in the API docs but it appears in the Task Edit window when I edit the task and if I edit the task within the salesforce ui and check send email notification everything works fine.  Is there any way to set this flag programmatically to yes in an scontrol so the task notification email is sent when the task is created?  Here is a code snippet:
 
Code:
function createInternalSignatureTask() {
    var task = new Sforce.Dynabean("Task");
 
    task.set("AccountId", "{!XXXX_Contract_Account_ID}");
    task.set("ActivityDate", new Date());
    task.set("Description", "Please review the final version of contract {!XXXX_Contract_Contract_Number} " +
        "and approve it when your review is complete.");
    task.set("OwnerId", "{!User_ID}");
    task.set("Priority", "Normal");
    task.set("Status", "Not Started");
    task.set("Subject", "Internal Signature Required");
    task.set("WhatId", "{!XXXX_Contract_ID}");
    task.set("WhoId", "{!XXXX_Contract_Company_Signed_By_ID}");
 
    sforceClient.create([task]);
}

 

Message Edited by gsickal on 05-04-2006 08:32 PM

Message Edited by gsickal on 05-04-2006 08:38 PM

I realize this is unsupported currently, but is there any way to create a new template e-mail and have it send immediately from an scontrol? I'm already creating the new e-mail, but currently it just opens into a standard send e-mail window and I can't find any URL parameter to just have it send the e-mail without requiring a second click.

What I'm currently doing:

window.location.href = "/email/author/emailauthor.jsp?retURL=%2F{!Contact_ID}&rtype=003" + "&p2_lkid={!Contact_ID}&new_template=1&nosave=0&template_id=";

I could of course handle this outside an scontrol with an external web server and a custom link, but I'd prefer to handle everything within an scontrol to keep it contained within SFDC.

Is there any way to do what I want (supported or not) or am I stuck with manual intervention or an external solution?

BTW, adding &save=1 to that URL causes an internal server error, not sure if save=1 is supposed to work and is just currently broken or is just an unexpected URL parameter for this page that causes an error.

Thanks,
E.J.
  • January 31, 2006
  • Like
  • 0

Hi,

I have managed to attain the dreaded "Error: Formula is too big to execute" error in a formula (number) field in salesforce.  Basically all I want to do is add together some custom fields - each of which do a calculation of their own (hence why I reach the error).  One of the ways suggested to me (and the direction in which I wish to proceed) is to do the calculation via an scontrol.  Essentially what I need to do is this:

{!Q1_score__c} + {!Q2_score__c} + 15 more fields...

...and store the results in {Total_score__c}

I should note that I have no experience relating to the use of scontrol, apart from the fact that I've gathered that I probably need to add C:\Program Files\salesforce.com\OfficeToolkit\2.0\SF_MSApi.dll into the files part when creating an scontrol.

Any assistance will be gratefully received.

Kind regards,

MNoorgat

I wuold like to know if you can use sForce Controls to Look Up data in an outside Salesforce table and then use that data to update a Salesforce.com field in the actually open record/objet field/attribute.

For Example : if I use a FedEx tracking number that it is stored in a custom field called FEDEX TRACKING of the OPPORTUNITY object, and I found the LOCATION where the package is located at that time. Can I store the result back in a CUSTOM field that I called LAST LOCATION ???

What wuold be the best strategy / technique to do it ?

I will apreciate anybodys comments / help with this question.

Marcelo

 

 

 

 

 

I'm using an Scontrol as a WIL, displayed in a salesforce.com window with sidebar. In this configuration, my control is actually displayed inside of an html IFRAME, which is fine.

When my Scontrol finishes what it needs to do, I'd like to send the user automatically to an Opportunity page. However, if my html code uses a javascript call to go to https://na1.salesforce.com/00630000000abcd, the new Opportunity page shows up inside the little frame, instead of being displayed in the full IE window. I tried the "frontdoor" technique (as described elsewhere in this forum), but that got the same results.

From inside my Scontrol, how can I send the user to an Opportunity page without being stuck inside of the Scontrol IFRAME?

Thanks,
Nick

  • February 18, 2004
  • Like
  • 0