You need to sign in to do that
Don't have an account?
Siddharth
This what i have found on one of the samples on community, but it doesn't seems to be working. Please help me out as how should i make use of AJAX. Also is there any way where we can call this from a simple HTML page. Do we need API support to use AJAX or is it the reference script that will make it all. Any suggestion and help would be appreciated.
How to use Ajax 8.0 with visual studio.net 2005
Hi
I am trying to use sfdc AJAX 8.0 with .net 2005. Can anyone help me out inorder to how should i use it. I have used the
following script tag and has included the same in the aspx page as below:
<script src="https://na1.salesforce.com/soap/ajax/8.0/connection.js" type="text/javascript"></script>
Also inorder to test the ajax utlity i have added the following code in the <Head> tag.
<script type="text/javascript">
function setup()
{
var callback = {onSuccess: display, onFailure: failed};
var lr = sforce.connection.login(Username,password);
var userInfo = sforce.connection.getUserInfo(callback);
}
function setup()
{
var callback = {onSuccess: display, onFailure: failed};
var lr = sforce.connection.login(Username,password);
var userInfo = sforce.connection.getUserInfo(callback);
}
function display(userInfo) {
var doc = document.getElementById("name-span");
doc.innerHTML = userInfo.userName;
}
var doc = document.getElementById("name-span");
doc.innerHTML = userInfo.userName;
}
function failed(error) {
document.getElementById("name-span").innerHTML =
error.toString();
}
</script>
document.getElementById("name-span").innerHTML =
error.toString();
}
</script>
In the body i have called the setup function as below
<body onload="setup()">
Hi there! <span id="name-span"></span>
Hi there! <span id="name-span"></span>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
<div>
</div>
</form>
</body>
This what i have found on one of the samples on community, but it doesn't seems to be working. Please help me out as how should i make use of AJAX. Also is there any way where we can call this from a simple HTML page. Do we need API support to use AJAX or is it the reference script that will make it all. Any suggestion and help would be appreciated.
You can use Ajax from ASP.NET, but you will need to write a service on your server to make your Ajax calls to. You service would in turn, communicate with the Apex API.