• Dave123
  • NEWBIE
  • 0 Points
  • Member since 2009

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies
I'm getting 'Authentication Required' alert when I try to run following S-Control code:

------------------------------------------------------
sforce.connection.remoteFunction({
url : URI,
onSuccess : function(response) {
document.getElementById("result").value = response.textContent;
},
onFailure : function(response) {
document.getElementById("result").value = "Failed " + response;
}
});
}

Output: Failed Error 401: Error reported: 401

------------------------------------------------------
Alert Details:
------------------------------------------------------
Authentication Required

A user name and password are being requested by https://na6.salesforce.com. The site says:
"api.dummy.com"

User Name
Password

OK Cancel
------------------------------------------------------

I've tried following code with Authorization header but that did not work either.

sforce.connection.remoteFunction( {
url : URI,
mimeType: "text/plain",
requestHeaders: {
"Content-Type":"application/x-www-form-urlencoded",
"Authorization" : 'user-pass= ' + username + ':' + pass
},
method: "GET",
async: false, // we really need the auth token to proceed, so wait
onSuccess : function(response) {
document.getElementById("result").value = response.textContent;
},
onFailure : function(response) {
document.getElementById("result").value = "Failed " + response;
}
});
}

------------------------------------------------------

Please let me know how can I avoid this username/password alert.
hello,
 
I'm using  vs .net 2005 to develop a client AP.
 
I want to support the salesforce professional edition users can through my client ap to connector the SF database.
 
but I go a problem when I follow the document and try it...
 
my code is like the follow:
 
namespace XSforceOfficeToolkit
{
    public class XSForceOffTk
    {
        public SForceOfficeToolkitLib3.SForceSession3 g_sfApi = null;       
        public void ShowErrMessage(string m_errMsg)
        {
            System.Windows.Forms.MessageBox.Show(m_errMsg);
        }
        public bool Login(string name, string pwd)
        {
            Console.WriteLine("XSForceOffTk :: Init() Enter");
            bool bLogin = false;
            g_sfApi = new SForceOfficeToolkitLib3.SForceSession3();
            bLogin = g_sfApi.Login(name, pwd);
            if(bLogin == true){
                ShowErrMessage("Login Success !");
            }else{               
                //ShowErrMessage("Login Fail !");
                ShowErrMessage(g_sfApi.ErrorMessage);
                ShowErrMessage(g_sfApi.ServerUrl);
            }
            Console.WriteLine("XSForceOffTk :: Init() Exit");
            return bLogin;
        }
    }
}
 
the fail message is :
1. API is not enabled for this Organization or Partner.
 
does anyone know where's wrong...thanks for your help~~~~
 
 
 
Hi folks - I've got mixed answers on this one. If I create an AppExchange application that uses Apex Code as part of it, can I install that application into a customer's professional edition org?

If not, that would severely reduce the chance that we could actually use Apex Code since it would mean that we couldn't sell to a big chunk of customers.

Ryan
Does anyone know a way around the restriction of Salesforce.com's requirement to use enterprise edition in order to use the API?

My customers have professional edition and don't want to upgrade to enterprise yet they want to merge functionality with other premise based systems which requires the API.

Is there a way to turn on the API with professional API?

Any work arounds?

Thanks!
  • October 19, 2007
  • Like
  • 0