• JimmyC1228
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 5
    Questions
  • 2
    Replies
I am trying to write an s-control which switches the current login to that of a system administrator so that certain data only available to admins can be queried.  I have the following code, which works in IE when I enable cross-domain data access in the security settings, but gives me a permission error in Firefox when it calls XMLhttprequest.open.  It also won't work in IE if that security setting isn't changed.  Does anyone have any suggestions for fixing this without changing the security settings?  I am new to the world of s-controls; so, any help would be greatly appreciated.  Thanks.

    function initSession() {

        sforceClient.setLoginUrl("https://www.salesforce.com/services/Soap/u/7.0");
        sforceClient.init(null, null, false);
        var loginResult = sforceClient.login("abc@xyz.com","1234");
        alert(loginResult);
    }
I am trying to update the lead information on all the leads that I have including those that have since been converted to opportunities.  I have created a new field on the leads page that is a date that I want to track in Salesforce, and I want to insert those dates into the records for leads that have been converted to opportunities.  When I download all my lead data into Excel using the connector, it gives me an error when trying to update the lead fields for those records that have been converted.  Does anyone know why this is or how to get around it?  Is there another way to do this without deleting the opportunity and re-converting?  Thanks.
I am using the Office Edition Excel Add-in, and I have some code to refresh reports in a workbook and then sort them.  When I run the program, the ouput is not correctly sorted.  I think this is due to the sort process starting before the refresh finishes.  Does anybody know if there is a method to check if a refresh has finished before proceeding?  If not, does anyone know how else I might avoid this problem.  Thanks.
I am trying to write some code in VBA in Excel using the Office Edition toolbar to automatically refresh the reports in a workbook when a button is pressed.  When I first open the file and press the button, Excel tells me that the requested file cannot be found.  My code looks like this:

 If Not (SFDCExcelAddin.CommandBarRelated.IsLoggedIn) Then
        SFDCExcelAddin.CommandBarRelated.Login
    End If
   
    Sheets("Raw SalesForce Data").Select
    SFDCExcelAddin.CommandBarRelated.RefreshAll

If I change RefreshAll to Refresh and then select the desired report, it works fine; so, I don't understand why RefreshAll can't find the report.  Alternatively, if I manually refresh the report from the toolbar, and then run my subroutine it works.  Does anyone have any idea what might be causing this or how to get around it?  Also, does any one know where I can find documentation for the SFDCExcelAddin library so that I can better understand what the methods do and how to work with them?  Thanks.


I am trying to generate a report that will average the number of days that an opportunity spends in certain stages of our sales process.  I have fields in each opportunity that calculate the number of days per stage, but the problem that I am running into when generating the report is that many of the opportunities have not reached the final stages.  When I average that column, the report totals the number of days for all opportunities and then divides by the total number of opportunities.  I need it to just divide by the number of opportunities for which there is a value present.  For example, if only two opportunities have reached the final stage and have values of 10 and 14, but there are 8 total opportunities in the report, the report returns an average of  3 instead of 12.  I currently have the fields setup so that they treat blank values as blanks.  Does anyone know if this possible, and if so, how would I do this?  Thanks.
I am trying to write an s-control which switches the current login to that of a system administrator so that certain data only available to admins can be queried.  I have the following code, which works in IE when I enable cross-domain data access in the security settings, but gives me a permission error in Firefox when it calls XMLhttprequest.open.  It also won't work in IE if that security setting isn't changed.  Does anyone have any suggestions for fixing this without changing the security settings?  I am new to the world of s-controls; so, any help would be greatly appreciated.  Thanks.

    function initSession() {

        sforceClient.setLoginUrl("https://www.salesforce.com/services/Soap/u/7.0");
        sforceClient.init(null, null, false);
        var loginResult = sforceClient.login("abc@xyz.com","1234");
        alert(loginResult);
    }
can someone please explain why this login call fails with 'permission denied' message? i am using IE 6.0 browser. I got same message with FF 1.0.3
 
<script src="https://www.salesforce.com/services/lib/ajax/beta3.3/sforceclient.js?broswer=true" type="text/javascript">
</script>
<script language="JavaScript">
alert("1");
sforceClient.init(null, null, true);
alert("2");
var username = "admin@xyz.com";
var password = "testing";

alert(sforceClient.login(username, password));

</script>
  • July 26, 2006
  • Like
  • 0