Stack Exchange Network

Stack Exchange network consists of 175 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

Questions tagged [javascript-remoting]

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

-1
votes
0answers
25 views

Need to call a function recursively

I have a remoting function returning data, I am trying to chunk the remoting action, as it exceeds the 15 Mb limit the single call. I have made the below changes in Apex Class:- @RemoteAction public ...
0
votes
2answers
33 views

Lightning Controller window.open();

When I use window.open(); in my lightning controller, it opens the URL but at the end of the salesforce's url. It does open in a new tab which is what I want but the url is confusing me. For example, ...
1
vote
1answer
25 views

Unable to use variable of javascript remote method variable in chart.js code. It is coming as undefined

I have to use list of accounts as labels in my chart. In order to fetch list of records I have used js remoting. I am able to fetch but not use within chart.js labels. Here goes my vfp :- <...
0
votes
2answers
22 views

Delete button is disabled due to time out issue

I have a page where websites are built by the users. When an user tries to delete the site from the page, the page is throwing error stating there is some issue and the delete button is disabled ...
0
votes
1answer
48 views

How to refresh a standard page using remote action in vf page?

I need to trigger a controller action once user loading the standard account page. So that I have created a custom vf page with zero height and embedded it in the account page layout in order to call ...
1
vote
2answers
73 views

Error using visualForce Remoting for javascript call to custom apex controller RemoteAction

I am trying to call a custom apex controller from javascript code in my visual force page but keep getting the following error : Visualforce Remoting Exception: No such column '_name' on sobject of ...
1
vote
1answer
42 views

Pass the callback value (result) from Visualforce.remoting.Manager.invokeAction to apex:repeat value.

I want to pass the return value of my remote action method to apex controller from javascript. This is my code. Visualforce.remoting.Manager.invokeAction(//get store list for map points ...
0
votes
0answers
43 views

How to create a map in JavaScript in VisualForce page

I am trying to create a map in VisualForce page where I also need to pass the inputtext value dynamically. Also once the calling the apex method defined as @RemoteAction will return back SObject[ ] so ...
0
votes
0answers
82 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
119 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
428 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
75 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
24 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
22 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
54 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
86 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
1answer
44 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
299 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
263 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
20 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
445 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
108 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
59 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
2k 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
60 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
55 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
92 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
43 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
137 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
69 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
141 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
1k 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
1answer
358 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
196 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
94 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
241 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
21 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); ...
1
vote
3answers
347 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
229 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
177 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
93 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
1k 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
77 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
346 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
58 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
418 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
34 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 ...
2
votes
0answers
215 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 ...