Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

JavaScript remoting in Visualforce allows you to call methods in Apex controllers from JavaScript.

0
votes
0answers
15 views

Pass Map<String, List<String>> from apex to javascript

I want to pass a Map<String, List<String>> from apex controller to javascript. Here is my approach, I am using javascript remoting for it but it's not working. controller function @...
4
votes
1answer
34 views

Call an apex method when leaving a Visualforce page

I have done some looking around and I cannot seem to find a current solution to my issue. I would like to call an apex method to remove records when a user leaves a visualforce page. I've gone down ...
4
votes
2answers
331 views

How can I stop JavaScript remoting reloading page

I'm trying to see what is my RemoteAction result however the page reloads before it happens. How can I stop this? VF Page: <button class="btn-enter-panel" onclick="getRemoteName()">enter <...
0
votes
2answers
16 views

generic timeout for apex:actionFunction

What I'm trying to do is to call function from apex controller on mu VF page with timeout. For this purpose I've decided to add next code <apex:actionFunction name="searchAuthProducts" action="{!...
0
votes
1answer
22 views

Salesforce Http response getting changed

There is a situation where I am sending a Http Request to my server. The result my server sends is [{"Data1":"MyData"}] but the data I am getting on salesforce side from response.getBody() is : [{"...
0
votes
1answer
21 views

Can we access Apex Controller class from a separate .js file?

I have a separate .js file and I want to access controller properties and functions using that file but as far as I know we must have a .vfp page and a controller attribute is given to apex:page, but ...
2
votes
1answer
33 views

Pass enum value in remoting method

I'm calling a remoting method from javascript. The method expects a custom class with one of the fields of type ConnectApi.MarkupType. While sending a string value for this field, I'm getting an ...
0
votes
1answer
57 views

Unknown method error in visual force remoting while passing the parameters

When i am trying to send parameter from Visul force remoting to apex method, it is saying that Unknown Method but method was exists in controller . Can anyone please help me how to fix this issue. VF ...
0
votes
0answers
26 views

How to set a request header to the javascript remoting calls

I see in the chrome dev tools that http request header "Accept" has "*/*" as the value for all the javascript remote calls. How can we change that to "Application/json" ?
0
votes
1answer
39 views

Send data from apex page to another apex page using javascript remoting

I have an apex page where I display a table with some information retrieved from an API, now I want to send information from the table when an user clicks a row from it, redirect to another apex page, ...
1
vote
1answer
157 views

Upload large ContentVersion records

I'm using a @RemoteAction to upload files to Salesforce, saving them as ContentVersion (Chatter files). I'm uploading the base64 Blob of the file. This works great for small (<1MB) files. I am NOT ...
0
votes
2answers
175 views

Can I declare more than one RemoteAction function in my class?

I have a class where I have declared @RemoteAction functions to work using Javascript Remoting. When I only had one function everything was working fine, but when I created a second @RemoteAction ...
0
votes
0answers
17 views

JavaScript Remoting Needs to be Called Multiple times before a return comes through

I am trying to better understand why some things are not working as I assumed they would. This specific example is a javascript remoting situation. I have a VFP that has a button that onClick calls ...
1
vote
1answer
146 views

apex:ActionFunction not reRendering or showing status

Not sure what is happening here. I am unable to show the spinner status or reRender the page with updated data. I did see this information about reRendering with conditionals but I am reRendering my ...
0
votes
2answers
82 views

Apex.Message in Iframe

What am I doing wrong? I hope this is just a simple mistake and me writing it out will even help spur some thought. I have a VFP embedded in a related list on the Lead object. When a user clicks a ...
1
vote
0answers
22 views

How to prevent VF Remoting from failing when there's no Referer header in the request?

I'm working on a ReactJS app served through a VisualForce page. If the initial request to the page containing the app doesn't include an HTTP Referer header, none of the requests sent to the page's ...
0
votes
3answers
956 views

window.open() is it works in Lightning experience or not

Hi we are using Javascript Remoting in Visualforce pages. in Javascript function we are using window.open() for opening Case creation page like below. window.open('/500/e?retURL=%2F500%2Fo&...
-3
votes
1answer
25 views

Submitting an Account Record into an approval when the Account Rating on warm Approved send an email automatically

Apex Class:- global class SAPRequest{ WebService static void SendApprovalRequest(string id) { // create the new approval request to submit Approval.ProcessSubmitRequest req = new Approval....
0
votes
0answers
40 views

Javascript button click on Apex Page

I have a requirement to develop such that a click on a Javascript button will send an email to a particular email address. After that it will open a new window. On it "Email Sent" will show and then ...
0
votes
1answer
49 views

insertion of a date field from vf page

I have a requirement to insert a date field for opportunity on vf page.For the creation of record i used vf remoting.But when i am sending opportunity closed date from page to controller and trying to ...
-1
votes
1answer
35 views

select deselect checkbox

i had created checkbox on visualforce in contact table. i used javascript to make it function able. select all ceckbox is functioning properly but when i deselect any row check box then select all box ...
1
vote
1answer
79 views

Is there a way to force apex code return status code 400 on remote action without throwing an exception?

I have a remote action that throws a custom exception on apex side when an error occurs, and on javascript application, response occurs with status code 400. A new requirement forces me to save a ...
2
votes
1answer
45 views

Visualforce Remoting with Empty String Ids

Here's a fairly simple example illustrating the problem that uses only standard objects: .pages/MyPage.page A page with an input text box and a button. <apex:page controller="Remote_MyPage" >...
0
votes
1answer
88 views

Size Limit in response. Visualforce pages

We have created an app that includes a Visualforce page with an Angular dev inside. We use Javascript Remoting / RemoteActions to connect the Javascript code to the Salesforce Server. We have faced ...
0
votes
1answer
781 views

How to call the setCallback function with a callback function

I am new to Lightning and am going through the Lightning Components Basics module. In the expensesHelper.js file would like to find out if it's possible to move the callback function definition ...
0
votes
1answer
22 views

Function at the end list when printed on VF page using Remoting

I am using Visualforce Remoting method to display list of records on VF page. htmlTable += '<tbody>'; for(var inds in result){ if(inds === 'Locations'){ ...
0
votes
0answers
30 views

Visualforce: Renaming Dependent Picklist Labels

I'm looking to create VF page that references two dependent picklist fields. This VF page will be expose to the public so that they can create Support-Level cases. However, I want to be able to ...
0
votes
1answer
194 views

Unable to invoke action 'undefined': no controller and/or function found

Im trying to call a controller from my external js file, and im getting the title error, have you guys seen anything like this? Page: <apex:page controller="TestController" showHeader="false" ...
1
vote
1answer
109 views

Visualforce not defined

i was doing a page/script/controller functionality just see how it works, and for some reason i get the error "Visualforce is not defined". From what i got searching, this error shows when you dont ...
0
votes
1answer
76 views

Records Wrongly Deleted By Javascript Remoting

Below is the code snippet of the VF Page: <apex:page controller="UploadPageController"> <html> <head> <script type="text/javascript"> if (window.File && window....
1
vote
1answer
27 views

Extra whitespaces being removed during RemoteAction invoke

I'm using remote action to call apex function, and the issue is the parameter that passed might contain several white space, But I can see in the logs that several white spaces are being removed, and ...
0
votes
1answer
151 views

VisualForce, Replace apex:repeat value with return from Js Remote

I am trying to update an Apex:repeat section with new values returned from the controller. I have a JS remote call connected to a to refine my search qry This works and returns fine. However i ...
0
votes
0answers
17 views

How do i get all the queried field values(even if they are null) in the result of javascript remoting object

@RemoteAction public static List<wrapLeads> searchLeads( String searchString) //public static String searchLeads( String searchString) { System.debug(searchString); ...
0
votes
0answers
48 views

How do we handle Number formatting for Non-US locale using JS Remoting?

My application interface has a requirement to use JS Remoting, and it is a tabular structure in Visualforce. The interface also has rich text fields in the UI and thus I'm force not to use reRender ...
1
vote
3answers
249 views

How to Refresh a block of code with javascript function not wholepage in Lightning app

Need to refresh block 2 ..not whole page <apex:page > <script> function myFunction() { var y = document.getElementById("txt1").value; var z = document....
1
vote
1answer
181 views

Passing string from Visualforce JavaScript remoting response to another function

Here is some code in my Visualforce page: <script> function setNoteContent() { var newNoteId; var newNoteContent; var noteContent = ...
0
votes
1answer
133 views

VF Remoting failed to call the apex method and onclick is not working?

VF Code : <apex:page controller="AYKE_FAQ_SearchController"> <apex:form > <apex:pageBlock > <center> <button onclick="ThumbsUpCount(\'{!language}\',\'...
0
votes
1answer
58 views

Client side Typescript library for communicating with salesforce

Just wondering if anyone has added typings for any of the client side javascript libraries out there? If not, is forcetk still the latest and greatest solution (will be using primarily for VF pages)? ...
0
votes
1answer
593 views

Custom Quote Calculator plugin in Advanced Calculator org

A requirement I'm looking to meet is to adjust pricing along a curve as it relates to total quantity of items in a quote. The curve is derived via a quadratic equation where the admin can tweak the ...
-1
votes
1answer
52 views

Not able to see header in visualforce page (classic)?

I am unable to see header in classing though it working fine when i am switching to lightning . <apex:page sidebar="true" showHeader="true" > <script> window.onload=function() ...
2
votes
2answers
258 views

Visualforce Pagination and Viewstate

I am working on a searchpage in Visualforce where pagination is needed on a very large dataset. StandardSetController does not seem to be a good fit due to the fact that the entire dataset is still ...
1
vote
0answers
44 views

Slow Javascript Remoting on First Call

I have a VF page that calls a search method from my class using Javascript Remoting. I found that the very first call for the day takes a very long time, and often goes over the timeout (I currently ...
1
vote
1answer
262 views

JavaScript remoting access paramter from one method into other

I have some query on Javascript remote action,as i am not much aware of that concept.Pls help me out..I need to access a parameter of Remote Action method into another remote action method Global ...
0
votes
1answer
32 views

Select a Contact From a Table and Grab Phone Number

I have an issue that I think I am over complicating. I have a table of Contacts. I need to select a Contact and grab their mobile phone number. I have tried everything from visualforce remoting to ...
1
vote
0answers
175 views

Visualforce Remoting Exception: Unable to determine from which page the request originated

I am using remote calling from my visualforce page, and it is working fine, but for some reason, it is throwing the exception Visualforce Remoting Exception: Unable to determine from which page ...
2
votes
1answer
542 views

Visualforce is not defined while using visual force remoting

I am using angular as a framework for this visualforce app, however when I try to use Visualforce remoting I get an error in the console angular.min.js:123 ReferenceError: Visualforce is not ...
0
votes
1answer
34 views

How to form URL in javascript along with user and account details as parameters to open it in new tab

I have an inline vf page with 3 inputtext fields and a commandbutton on account record. Now,when i click on commandbutton it should redirect to another URL. The URL contains current loggin user id and ...
1
vote
1answer
56 views

Nested javascript remote method calls need to work synchronously

I have nested java script remote method calls, the first method gives me an array and I need to iterate through that array and call the second remote method with an array element as an argument and ...
0
votes
1answer
54 views

Update opportunitylineitems inside an apex:repeat

I build inside a VF , a list of OpportunityLineItems using : <apex:repeat value="{!productsList}" var="p"> € <apex:inputField value="{!p.TotalPrice}" onchange="updateProd('{!p}');"/> (...
4
votes
3answers
404 views

Create HTML view for JavaScript Array in VisualForce page

I am having problem to print table in VF page using JS array. my code. <apex:page controller="customController" > <script> var json = new Array(); <apex:repeat ...