Questions tagged [ajax]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
2k 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 ...
0
votes
1answer
366 views

AJAX attachment upload, bad field ParentId

I have a project to upload some files for both licensed users and portal users. Got it working 98%... except for portal users.. mama mia... I created a site off a domain, logged in a user and ...
3
votes
1answer
8k views

Assertion Failed on custom object - Lightning component

I have been developing a basic lightning component to return all the names of my custom object "competitor" but am being thrown this error? Assertion Failed!: Unable to get value for key '...
1
vote
2answers
569 views

Controller values not updated with ActionSupport

I'm having a VF page which shows a table, together with 2 dropdowns and a checkbox which function as filters. Whenever a picklist value or the checkbox changes, the table should get rerendered having ...
0
votes
1answer
66 views

JavaScript Custom Button behaviour

I have defined a javascript custom button. As soon as the button is clicked, the page should grey out. In mozilla firefox, the below code works as expected: var $j = jQuery.noConflict(); ...
2
votes
0answers
378 views

Salesforce AJAX API not allowing ContentVersion Create

I've this code to create a Content record from AJAX toolkit api: And when I click upload of file this is the SOAP packet that gets posted and in return I get this error: <se:Envelope xmlns:se="...
0
votes
1answer
95 views

What is the standard way to save to the database after a Web Call?

I'm trying to get a managed package into the Salesforce App Exchange. My app was rejected by the security review. One of the complaints was: Insecure Endpoint My company sells data about private ...
0
votes
1answer
132 views

In Internet Explorer, JavaScript button when clicked does not have the blue border like Chrome

In Chrome when you click a JavaScript button, it will surround the button with a blue border and this indicates the user has clicked the button. In Internet Explorer, this does not happen. Is there ...
0
votes
0answers
172 views

Call apex rest api from javascript ajax, returned successfully but no data

I made an ajax call from my client, not visual page $.ajax({ type: 'GET', url : requestUrl, //add the authorization header including the access_token requestHeaders : {...
0
votes
1answer
535 views

Is there any way to do an ajax call to data extension from 3rd part site html page?

I have an input text box on a 3rd party site webpage and this webpage is simple HTML page. In the input textbox, I want to validate if entered number is valid or not. I can do this by jquery by ...
2
votes
1answer
120 views

How to apply Apex:ActionSupport to trigger HTTP action

I am trying to use apex:actionSupport to trigger an URL (along with calling a value , c.sfprn , from {!RowList}. Currently, dropdown menu works, but when an user clicks the dropdown, nothing triggers....
21
votes
2answers
6k views

What actually happens on re-render?

I would like to know what actually happens on re-render (Ajax Call and DOM replacement) in Salesforce. My Idea: The ajax call is made to get data. On completion of the ajax call, the DOM is ...
0
votes
1answer
58 views

JavaScript error on custom button

I have created a custom button with following Onclick JS Code - {!REQUIRESCRIPT("/soap/ajax/32.0/connection.js")} {!REQUIRESCRIPT("/soap/ajax/32.0/apex.js")} var Profile = "{!User.Profile}"; var ...
3
votes
0answers
174 views

Ajax REST Tooling Queries Return Null SymbolTable?

Background I'm trying to build upon Daniel Peter's approach in his HyperBatch library to build a HyperQuery tool that will allow me to get better insight into some large tables we have without ...
1
vote
0answers
31 views

Web & Mobile analytics Track Purchase Details with AJAX Redirector Call [closed]

I want to use use ajax call to track purchase items. I found this documentation but it's not very clear in particular how compose the url to pass to the function.
1
vote
2answers
2k views

How to rerender an outputpanel after remoting completes

I have a repeat control that populates commandbuttons(view,edit,delete) for each record of an object. On click of a command button I want to delete the respective record and render the containing ...
3
votes
2answers
9k views

Refused to set unsafe header "User-Agent": connection.js

Don't know why i am getting unsafe header error in console. Everything is working fine but i am wondering what is the error here. Below is the code: function getFieldOptions (objName, ctrlFieldName) {...
4
votes
3answers
1k views

what happens behind the scenes of salesforce remoting

I am new to salesforce and Apex programming. We call remoteactions from javascript in 2 ways. 1.By using namespace.controller.method 2.By using Visualforce.remoting.Manager.invokeAction pattern. I ...
1
vote
1answer
1k 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 submitted ...
0
votes
1answer
792 views

How do i trigger a form submit after validating with <apex:actionFunction>?

I have a form that i need to validate 1 field by the controller, what is the right way to to preform validation with the controller and by the answer to preform form submission?? Heres the VFP code: ...
1
vote
1answer
30k views

Response status is '0' in jquery ajax

I'm using a jquery ajax for storing a data in the database. I call a service through a url and send data to it in the following way: $.ajax({ type: "POST", url: "http://192.168.250.118:8080/...
0
votes
1answer
4k views

how to insert ajax result json format into Datatable?

$.ajax({ url: "apex/demopage", success: function(resp) { } }) //and my resp coming as follows [ { "attributes": { "type": "something", "url": "...
3
votes
2answers
458 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 ...
6
votes
1answer
1k views

How To Stop actionPoller After Set Duration?

Can we stop the <apex:actionPoller> from executing after a set duration?
0
votes
1answer
154 views

Populate a form field based on lookup value by AJAX

I am having a bit of trouble with working out how to populate a field on my custom object based on the selection of a related object record via lookup. I have 2 custom objects - Case_Item__c and ...
1
vote
1answer
437 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" selectedTab="...
1
vote
1answer
150 views

How can I pre-populate a field based on a connection.js query result?

The query itself seems to work, but getting its result (the Campaign Name) into the desired field doesn't work. As it is, the code results in the field being populated with: {done:'true', ...
1
vote
1answer
595 views

jquery.ajax in Visualforce

I don't konw whether there are some error in my code, so does anyone have experiences about use jquery.ajax in Visualforce or how to post a request to an external service in Visualforce? When this ...
0
votes
0answers
54 views

Salesforce Ajax call throwing exception

I have the following ajax call that I am sending to an outside domain. but it straights goes to error function is there something that I am missing . I have added the url into remote setting $....
2
votes
1answer
828 views

Lightning component lazy loading

Is it possible to insert a lazy loading into a picklist : so while the list is loading, the rest of my page is displayed. For now, the list I have to display is so long (due to the request I think) ...
1
vote
1answer
292 views

Javascript to POST to apex rest resource gets Invalid Session ID, but POSTing from third-paty services doesnt, what am I missing?

I'm trying to call into Salesforce via Ajax from another site. I've verified the content of my request is correct using a service to call in using the same JSON and auth token and everything, but when ...
1
vote
1answer
5k views

Execute Javascript after ActionFunction completes

I have the following on a Visualforce page: <apex:actionFunction action="{!updateName}" name="updateName"/> <apex:inputField value="{!C.Name}" onChange="processName();"/> <script> ...
0
votes
0answers
115 views

How do I download a file from chatter in visualforce page?

I am new to Salesforce. I have a large xml file in Chatter/Files that I need to download and process on the client. How can I get the file? I am able to get static resources via ajax, but this file is ...
-1
votes
1answer
515 views

calling apex method in Ajax on click of input tag

<apex:page standardController="Account" extensions="showDuplicates"> <apex:form > <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.2/...
1
vote
1answer
794 views

Display time remaining before apex:actionPoller refresh

Is there any way to easily display to the user how long between actionPoller refreshes? I tried using the onSubmit and onComplete event attributes in the actionPoller tag to call a timer function, ...
1
vote
2answers
907 views

Get id of an record on click of checkbox

I need to get the id of an record on the click of checkbox. I am able to get the id in outputText though. public class AjaxUtility { public List<Account> accList{get;set;} public List&...
1
vote
0answers
364 views

Submitting form in landing page (cloud pages) using ajax? [closed]

I have several forms in a Cloud Pages Landing Page. Using smart capture will not work to submit them since some of the forms are inside list items and the success message needs to be in a list item ...
0
votes
1answer
430 views

Rest api response error json

enter image description hereI am connecting wave rest api using Ajax toolkit.I am getting error response like the below image if I pass the SAQL to the Wave REST API: <apex:page applyHtmlTag="true"...
1
vote
1answer
997 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?
0
votes
2answers
659 views

Using AJAX in Salesforce [closed]

I want to create a picklist of all objects of my salesforce org. by the help of AJAX, without using apex controller.I want to achive this functionality by VF page only.
0
votes
1answer
233 views

Sforce Query Returns only Id and Type

I'm trying to make a custom link that executes some JavaScript in order to look up an Account, but running into an issue. I expect to get the entire Account back, but I'm only getting an sforce.Xml ...
4
votes
1answer
2k views

Possible to Set Access-Control-Allow-Origin in an SFMC Landingpage?

we want load some content from an SFMC Landingpage using AJAX on our Webpage. But its not working in every Browser because the CORS Access-Control-Allow-Origin is missing on the SFMC Landingpage. Is ...
3
votes
1answer
993 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 sanitize(...) ...
3
votes
2answers
2k views

Set timeout always 10 seconds for remoteFunction [duplicate]

When the onLoad function is called this code runs. The timeout is set to 2 minutes but the server always returns an error after 10 seconds despite the timeout field. How can I set the timeout to be ...
1
vote
1answer
656 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
40 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
46 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 ...
2
votes
0answers
72 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
1answer
210 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 ...
1
vote
1answer
1k 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 ...