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
1answer
20 views

Visualforce Picklist from Javascript Query

Can I draw a Picklist in a Visualforce with a Javascript query? With de ajax connection.js in visualforce, I'm trying to retrieve a list of some values, Ex: var qr = sforce.connection.query(“SELECT ...
0
votes
0answers
22 views

VisualForce: onChange don't work in IE

I have a VisualForce page with the drop-down menu. <apex:selectList value="{!StyleGuide}" size="1" styleClass="SlectBox" id="styleguideSelect"> <apex:selectOptions ...
0
votes
0answers
13 views

Update RichFaces from 3 to 4 for salesforce app

I'm new to Salesforce and try to fix a bug in existing web application. The problem is with the 3_3_3.Finalorg.ajax4jsf.javascript.AjaxScript file. It doesn't work in IE browsers (up to IE11). I've ...
0
votes
1answer
16 views

Custom Javascript Button returns “Unexpected token ILLEGAL”

I'm trying to create a custom button that executes javscript on the Case object. I simply want to check if the Case has a specific child record already and forward the user to that record if it exists ...
-1
votes
0answers
26 views

Not Able to insert record using REST call via VF page

function insertAttachment() { $.ajax({ contentType: 'application/json; charset=utf-8', data: { "ParentId": "a0ab0000005kdfr", "Name":"sdsff", ...
0
votes
0answers
13 views

Custom Button Ajax CORS Error

Running the following code as a button: {!REQUIRESCRIPT("/soap/ajax/19.0/connection.js")}{!REQUIRESCRIPT('//code.jquery.com/jquery-2.0.3.min.js')} $(function() { var params = { // ...
0
votes
0answers
26 views

actionFunction with oncomplete and status attributes not working with Internet Explorer

I have an actionFunction with oncomplete and status attributes (please see the code below). The oncomplete has javascript that finishes our workflow, and the status starts and stops an ajax overlay ...
1
vote
0answers
18 views

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud?

Is it possible to use Ajax to POST data from within a Server-Side Javascript in the Marketing Cloud? Could the FormData be a problem? I've been using this code: var form = new FormData(); ...
1
vote
1answer
23 views

AJAX - Can I reference a method from the controller by url?

I am wondering if I can use the standard $.ajax, $.post or $.get with visual force. If so what do I put in the url? Can I get the url of the method I want to make a call to?
3
votes
1answer
50 views

Disable Custom Button in Standard Page Layout

We have a custom button in Opportunity standard page layout and when clicked it calls a webservice class (Apex class called by OnClick Javascript via AJAX) It is a synchronous call as such it takes ...
3
votes
2answers
119 views

How do I load Bing Maps in Visualforce?

Using the following code on a Visualforce page does not load the map: <apex:page doctype="xhtml-1.0-transitional" showHeader="true" sidebar="true"> <html> <head> ...
2
votes
1answer
46 views

Need help with custom javascript button to update records

What's best way to update records based on record type using custom button. Below code partially works and fields updates inside 'If block' doesn't work. What I'm missing here ? ...
0
votes
0answers
25 views

Dynamic data liking from salesforce package using javascript

I have to create a widget that would allow us: Select the contry Based on the contry selection, related states will be displayed Based on the state selection, related cities would be displayed..this ...
1
vote
1answer
16 views

Instantiating a field of an sObject with a string value passed through AJAX

I am trying to instantiate a sObject in my controller. The information that I am populating about it comes from my AJAX. Including the name of the field that I want to populate + its value. So with ...
1
vote
0answers
30 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
48 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
216 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
48 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
57 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
27 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
83 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
197 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
238 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
253 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
1k 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
285 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
86 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
679 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
68 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
86 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
191 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
375 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
464 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
169 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
74 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
46 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
926 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
528 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
199 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
45 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
120 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
124 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
241 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
181 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
73 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
28 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
313 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
52 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
88 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
245 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 ...