With AJAX (Asynchronous JavaScript and XML), web applications can send data to, and retrieve data from, a server asynchronously.

learn more… | top users | synonyms

1
vote
0answers
17 views

Async javascript call from Visualforce to REST service returns 403 forbidden (only in production)

I have a simple Visualforce page with a couple of input fields and a button (No controller being used here) that, when the button is clicked, sends a JSON payload to an Apex REST service. I am using ...
1
vote
1answer
29 views

Display/Rerender google map with the updated list of addresses

i have displayed google map for accounts(lets say 10 accounts) I have a accounts differentiated by segments. i want to filter out accounts using segment, and based on the result i want to rerender ...
6
votes
1answer
120 views

AJAX load JSON from static resource

I am trying to load a JSON file into my VF app via AJAX. It currently sits in a zipped static resource, like such: myResources | |js | |target.json ...
0
votes
1answer
39 views

How to post the json values to salesforce?

$( document ).ready(function() { $("#bntSubmit").on('click', function (e) { // Initialize the object, before adding data to it. // { } is declarative shorthand for new ...
0
votes
0answers
34 views

Oauth2 in Chrome extension

I am trying to use the Oauth2 library to connect to salesforce from a 3rd party website. This is my salesforce.js file OAuth2.adapter('salesforce', { authorizationCodeURL: function(config) { ...
0
votes
0answers
16 views

Chrome PlugIN salesforce integration

I am trying to connect to salesforce with a Google Chome PlugIN and perform some SOAP/REST api calls afterwards. I tried to use the AJAX tool kit you provided, but when loading the connection.js ...
0
votes
1answer
58 views

Correct way of using apex:actionPoller

I want to refresh pageblock table after every 20 seconds, but it is not working. Can anyone suggest how should I use actionpoller tag in below code VF Page: <apex:page standardController="Case" ...
0
votes
0answers
114 views

jsTree can't get JSON by ajax method

I use jstree to display data but have many data. It loads an apexpage in jsTree. What's wrong? In url ajax function must be URL??? what should i put in this to get parameter from controller? I want ...
0
votes
1answer
124 views

Custom button that will open a popup to select from a picklist

I have a requirement to create a custom button that will open a pop up window with some options to select. Currently i've built a VF page and called it from the custom button. But i need to expose ...
2
votes
0answers
139 views

How to reload entire visualforce page from Controller [closed]

I have one visualforce page with "Login Window" html button. When click on "Login Window" button, modal window will open with username,password and Login button. Whenever user click on Login button in ...
1
vote
1answer
525 views

jQuery AJAX request responses with 401 Unauthorized

I have problem getting result from the custom REST service with my AJAX request. The call to REST service is responded with "Unauthorized". I am using static jQuery resource (jQuery version 1.7.2) and ...
0
votes
2answers
186 views

On Visual Force Page I want to load Pageblock section if the Pick list value is selected yes on the same page?

I want to load one page block section on the same VF Page only after the user select the value in the Picklist(which is on the same VFPage). I have used render and reRender option but it does not work ...
2
votes
1answer
72 views

Field update Onclick Javascript not showing on record

I am trying to update a field on a record using an OnClick Javascript button. It seems to be updating the record but when I refresh the page nothing shows. What am I doing wrong? Below is my code: ...
2
votes
1answer
446 views

Uncaught reference error: sforce is not defined

I have a vf component in a page which includes a static resource. In the resource, I have a apex method call. Since I am using the same resource in a custom button also, I am using AJAX tool kit ...
0
votes
1answer
53 views

Ajax callout from latest salesforce1 version not working

I am making an ajax callout to a google maps api(URL), from a VF page that is built for salesforce1 (iPad). The api I'm using is reverse geocoding. When I debugged, the $j.Ajax function was not ...
1
vote
0answers
77 views

Status of jquery.ajax from Server-Side Javascript

Please see the following codes: Front-side AJAX request code: function addAjax(emailIds, valObj) { var jqxhr = $.ajax( { method: "post", url: ...
2
votes
1answer
129 views

Are aura:waiting and aura:doneWaiting component specific events?

Good afternoon everyone, I have a question regarding the use of the aura:waiting and aura:doneWaiting system events. I currently have two nested child components within a container component as you ...
0
votes
0answers
239 views

sforce.apex.execute is not executing method

I am using the ajax/connection js on a custom visual force page <apex:includeScript value="/soap/ajax/34.0/connection.js"/> <apex:includeScript value="/soap/ajax/34.0/apex.js"/> I am ...
2
votes
2answers
322 views

How to disable command button while the page is being processed by other action?

I have apex:commandButton and apex:selectList. When the user selects an item in apex:selectList, it takes some time to process the request. While the request is being processed, I'd like to disable ...
0
votes
1answer
109 views

Convert picklist and dependent picklist to multiselect picklists in visualforce page

I want to convert picklist and dependent pick list in to two multipick lists in visualforce page for selecting multiple values for searching purpose. When I select multiple values in first ...
3
votes
2answers
69 views

Respecting sharing settings when using jquery post

I was looking at this post : http://www.oyecode.com/2014/02/how-to-salesforce-rest-api-from-browser.html Lately many developers are looking into jquery/ javascript/ ajax based approach to make UI ...
0
votes
1answer
38 views

Has anyone used transaction control in custom button using Ajax?

I have requirement to use multiple DML statements in my custom button and I want to rollback the changes if DML fails as we do in Apex. I couldn't find any method in Ajax guide.
0
votes
1answer
624 views

Custom 'Submit for Approval Button' on Lead not Working

We replaced standard Workflow button(submit for Approval) on Lead Object with custom button that validates the fields with in Lead and gives a pop up Message if the fields are not populated. Was ...
2
votes
0answers
413 views

Calling a web service from a Visualforce page using jQuery Ajax

I want to call a web service using REST API from the Visualforce page. Below is my code. <script type="text/javascript" ...
3
votes
1answer
155 views

Get class' namespace prefix to use in a Ajax call

I'm trying to execute a class that comes in a managed package (I have a development and a deployment (sandbox) org that I'm testing this). I have a button in a Custom Object that calls a WebService. ...
1
vote
1answer
35 views

How to handle incompatible portal types during merge using code?

I m doing merging using MergeRequest at Visualforce side, for(var i=0;i < records.length;i++){ if(i==masterRecordIndex){ continue; }else{ var mergeRequest=new ...
1
vote
1answer
111 views

Custom Button that will change a field in a custom object and consequently invoke before update trigger on the same object

I have a ajax cutom button that calls a apex class and the class is changing status field of that object. Now I want to invoke a before update trigger on the same object, which is not working. ...
2
votes
1answer
112 views

How do I submit a simple AJAX form and avoid the cross origin issue?

I've placed a form on a page that I must use ajax to submit with. Since I'm using a .net site I can't place the form tag around the form and I don't have access to the backend (nor the knowledge of ...
1
vote
1answer
187 views

How to download a file with remote action

I need to create a csv file based on passed parameters. I want to call my function from angular service using controller's remoteAction. How can I make the browser save the string output as a file?
3
votes
1answer
145 views

Interpreting wildcards (eg, * and &) in SOSL queries through the API. Escape or not?

I have a search feature that is implemented with the AJAX toolkit to use SOSL. var results = sforce.connection.search("FIND {" + sanitize(...) + "} IN NAME FIELDS RETURNING ..."); The ...
2
votes
1answer
67 views

VF : Query on rerender attribute

Objective of my VF : Render any random 10 contacts in the upper part of VF page. Depending upon my interaction with input checkbox, the contacts available in the list (lower part) should get ...
2
votes
0answers
27 views

How to access connected app using AJAX tool kit

We have different communities in our org, for ex: community1, community2 etc. We have a connected app created in the org. the IdP-Initiated Login URL will be different for different communities. We ...
1
vote
1answer
260 views

Access controller property with Javascript visually immediately - after page load but before user action

I want to be able to access a controller property with Javascript to do some styling (based on the value of this property) so that it appears visually to be executed immediately on page load. However, ...
1
vote
0answers
47 views

Getting sales force user Information Using Identity Service

Using OAuth2 and REST with a custom created Remote APP, I am not able to get user Information using sales Force.com Identity Service by using jqury ajax call, however when i use postman of chrome to ...
0
votes
0answers
83 views

How to add ajax nature my VF page?

I have a simple VF page as shown below: <apex:page standardController="Account"> <apex:includeScript value="/soap/ajax/16.0/connection.js"/> <apex:includeScript ...
1
vote
0answers
180 views

Not able to use ActionSupport for date type of inputtext

I am trying to rerender particular section on change of date. however I am facing problem to rerender section on onchange event. I tried using onchange, onclick, onmouseout but this doesn't work as ...
3
votes
1answer
403 views

Is there a Javascript Wrapper Salesforce Metadata API?

I'm using Andrew Fawcett's legendary Apex Wrapper Salesforce Metadata API in several projects. It perfectly works and provides a new dimension of APEX programming. Now there are situations where it ...
0
votes
0answers
176 views

How to send an Ajax request to a force.com visualforce page from our public domain Site.com site (across domains)?

We're trying to retrieve whether our service is available in particular zip codes. In Salesforce we have a custom object called "Service_Zone__c," each record of which has a zipcode and an "in"/"out" ...
0
votes
3answers
56 views

Changes in controller properties not perstisted from actionFunction call

I have a repeat block that loops over a List<String> and outputs them to an HTML table. Underneath that is the actionFunction declaration followed by an HTML button which when clicked calls the ...
3
votes
1answer
240 views

Difference between Regular Page refresh and AJAX Page Refresh

VF <apex:page controller="transientctrl"> t1 = {!t1} <p/> t2 = {!t2} <apex:form > <apex:commandButton value="Refresh" /> </apex:form> </apex:page> Controller ...
1
vote
2answers
296 views

Is there a way to connect directly to Salesforce's REST API directly from JS? [closed]

I get a cross origin error when I do an AJAX call, and am wondering if there´s a way to solve that. Thanks!
1
vote
1answer
205 views

Unable to Access RestResource via jQuery Ajax

Question I am trying to access an endpoint I setup in Apex. The class is pretty simple: @RestResource (urlMapping = '/MyService/*') global class MyServiceApexClass { @HttpGet global static ...
0
votes
2answers
872 views

Page reloads on Clicking apex commandlink though reRender is set to None

I have an issue in apex:commandlink ,On clicking apex commandlink the page gets reloaded though i have set my reRender property to none.This works in chrome but not working in firefox and IE this ...
0
votes
1answer
95 views

Element viewStateWrapper with id = ajax-view-state must exist : Error

I have an visualforce page in which i am rerendering the apex form element on dropdown change. This page works fine until their is an validation error ( i am validating with jquery validate). Once ...
1
vote
1answer
212 views

apex:tabPanel issue in VF page

I am using very simple code for tab. It is working in one org but not working in other org. My VF page code is: <apex:page id="thePage"> <apex:tabPanel switchType="client" ...
1
vote
0answers
78 views

Blob Data corrupt when use Ajax proxy

Hi I want to get image from a public url and want to display this on page. For doing this I am making an ajax proxy request because public url is on cross domain: ...
0
votes
0answers
316 views

X-editable POST URL parameter and Visualforce

I would like to build a page using the framework X-editable My question is this: It takes a parameter of URL on the field which is documented as: url to server-side script to process ...
3
votes
1answer
89 views

Sending Contact Information To External Site With AJAX

I am working on a website that is using Salesforce for membership management purposes. Salesforce is the single repository for membership information and needs to be able to send membership ...
5
votes
1answer
2k views

Rerender page components from apex:component

I have a Visualforce component (apex:component) where I would like to trigger the rerendering of an apex component on the containing page. In this case the component to rerender is an ...
1
vote
1answer
429 views

File Attachments over AJAX call (XMLHttpRequest error)

Im trying to write a script that will grab a series of attachments and zip them up using JSZip. All is working well but the script does a call to grab the download url it seems like whats happening ...