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
11 views

Problem with showing errors with ActionFunction

Disclaimer : This is an homework exercise. Sort of. I'm trying to learn Visualforce + APEX + web design in a very short term, so I'm asking my friends to put up challenging questions for me. VF page ...
1
vote
0answers
24 views

Error on custom javascript button

Below code should update the Leadership_Notification_check__c when the Suite, RedLightReview are not empty, TOV >= 5000000000 and check field is 0. {!REQUIRESCRIPT("/soap/ajax/29.0/connection.js")}...
0
votes
1answer
39 views

How can I execute Javascipt after rerendering a component?

I have the following code: <apex:actionFunction name="saveRecords" action="{!saveRecords}" reRender="recordsTable" oncomplete="saveComplete();"/> However the code I ...
0
votes
0answers
12 views

Using Self Signed Certificate with AJAX Callouts

We recently are trying to improve the security of our API models by using certificates to only allow connections from our specific orgs. We have been able to successfully test this using a self signed ...
1
vote
0answers
15 views

How to resolve the problem of refreshing standard page multiple times until callout completes?

We are using opportunity custom button to populate the value of a field based on the response form future callout. In order to receive the value we had to keep refreshing the opportunity page until ...
3
votes
2answers
44 views

Global AjaxStart and Stop event on visualforce page

I am new to Salesforce and I want to achieve what I used to do in html pages. I defined ajaxStart ans Stop event and want it to be called whenever Apex execute it's actionFunction using Ajax. here is ...
2
votes
1answer
35 views

Manually Enforce CRUD and FLS in trigger handler and Ajax to pass salesforce security review

I want to pass salesforce security review in my app. I want to make sure that all the known issues fixed before submission. I have Enforced CRUD and FLS in to all the apex classes. But i am not sure ...
3
votes
1answer
27 views

Can't get Custom Object ParentID for Attachment save

I'm uploading an attachment via "sforce" following the example here: Upload attachment in VisualForce without reloading the whole page However I'm having problems getting a value for ParentId. I ...
0
votes
0answers
27 views

Submitting multiple web-to-lead forms from same multistep form

I have a client who has Salesforce Professional, so no API access. They want to capture data from each step of a four step form -- as a way of insuring against form abandonment. I have set up web-to-...
0
votes
0answers
54 views

A problem with the OnClick JavaScript for button was encountered and how to get AJAX version

I am facing this error using custom button in lead object "A problem with the Onclick JavaScript for this button or link was encountered: {faultcode:'soapenv:Client',faultstring:' The content of ...
1
vote
1answer
49 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
62 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 value="{!...
0
votes
0answers
22 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
51 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 ...
0
votes
0answers
28 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
72 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
44 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(); form....
1
vote
1answer
33 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
133 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
127 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
88 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 ? {!REQUIRESCRIPT("/...
0
votes
0answers
26 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
51 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
112 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
307 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
56 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 Object(...
0
votes
0answers
104 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
37 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
131 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
273 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
434 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
380 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
2k 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
403 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
105 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: {!...
3
votes
1answer
904 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
88 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
97 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: "mypage.aspx?QS=...
2
votes
1answer
263 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
450 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
660 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
215 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
78 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
49 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
1k 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
656 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" src="https://ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js">&...
3
votes
1answer
223 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
51 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 sforce....
2
votes
1answer
141 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. ...