Javascript is a weakly typed interpreted programming language primarily implemented by web browsers to allow for client-side scripting. It can be used in Visualforce pages to give a more dynamic experience to end users. Additionally, the Visualforce engine generates and uses JavaScript to support ...
-1
votes
0answers
11 views
Check Daylight timeperiod on a visualforce page
How to check that the datetime value I have lies in the daylight timeperiod or not in javscript on a visualforce page.
0
votes
1answer
14 views
I am using Google Maps API and I Can't Update Circle Radius Through Input Box and Button [on hold]
I am trying to update the radius of my circle through input box and button. I have the following code but It won't work. Any help will be appreciated.
<apex:page controller="GeoLocatorController" ...
0
votes
0answers
13 views
Internal server error: Lightning components basics, Event step
I encounter an issue with one trailhead from salesforce : Lightning components basics. I finished the previous chapter about be "connected to Salesforce with server-side" and the project worked.
Now ...
2
votes
0answers
14 views
Optimizing javascript on Lightning
(I am still new to Lightning so please forgive me if I'm using incorrect terminology.)
I have a lightning application embedded into a VisualForce page. It has two separate components that each calls ...
0
votes
1answer
21 views
A new button called “Copy to Mobile” in the object order page to copy the home phone field(in Account Object) value into Mobile phone field value
Created a button with Execute JavaScript and OnClick JavaScript
var records = {!GETRECORDIDS($ObjectType.Order__c)};
var updateRecords = [];
if (records[0] == null) {
alert("Please select at ...
0
votes
0answers
10 views
how to close primary tab in visual force page ..?
I have tried with below code but it's not working, can anyone suggest how to get this functionality?
I have a custom object called 'Obligation' and when the 'New' button is clicked, my visual force ...
0
votes
0answers
31 views
not able to get column id in javascript
I am trying to get the id of the input field(PEPM) which is enclosed in the column(PEPMColumn).I am trying the below code and i am getting the error in console ' TypeError: Cannot read property 'value'...
0
votes
1answer
15 views
If statement fails in Onclick javascript button
I have below code where if statement that needs to work based on 'check' boolean value, is not working properly.
Although, 'check' value is true it navigates to the else block. Can someone please let ...
0
votes
0answers
33 views
REQUIRESCRIPT alternative in lightining [duplicate]
I have the following button in Salesforce classic which uses onbutton press execute javascript:
{!REQUIRESCRIPT("/apex/dsfs__DocuSign_JavaScript")}
var sourceId = DSGetPageIDFromHref();
var RQD=...
1
vote
2answers
73 views
How to iterate over SObject list returned in Lightning Component Dynamically?
How to iterate over SObject list returned from server side controller in Lightning Component using <aura:iteration> to show the field values in table using dot notation.I am asking for passing ...
0
votes
1answer
28 views
Create external library for lightning component
They are a few JS methods I use on multiple components I write, for example a method that shows a toast on the screen based on parameters, or even my custom Logger class.
In a way to avoid duplicate ...
3
votes
0answers
63 views
Lightning component Slowness after Enable Lightning LockerService Security is turned On
I am using jstree (jQuery component) in one of my lightning component and i am experiencing unusual delay after turning on Lightning LockerService Security, this delay is noticeable in hover, scroll ...
0
votes
1answer
31 views
VisualForce System.NullPointerException: Attempt to de-reference a null object
Here I am trying to insert a Record. I have 2 input Field on the Form.when I click on the save Button,it just calling a JavaScript function:js(). This javaScript function take form inputField values, ...
0
votes
0answers
22 views
Popup Message from output text
Can you help me for show popup message from return output text for the message?
I have script :
<apex:page controller="ProcessPaymentController">
<script>
if({!msg!=null})
{
alert({!...
1
vote
1answer
23 views
Visualforce.remoting.manager.invokeAction Clarification
I am revisiting old code from an old developer and I am having trouble reading a line they wrote:
Visualforce.remoting.Manager.invokeAction(fetchAttachmentAndNote, parentId, function(result, event) {...
3
votes
1answer
46 views
Programatically add focus on ui:inputText
I'm afraid I'm hitting a limit of Lightning here, but I'd thought I ask here as a last resort.
I want to programmatically add focus on a field in a form.
I now have code like this;
Markup:
<ui:...
-4
votes
0answers
21 views
i want to use two check boxes in the visual force page [on hold]
i want to use two check boxes in the visual force page whenever i hit quick save button 1 checkbox leaves the value and second one updating.
<script>
window.onload = new function() {
...
0
votes
1answer
26 views
TypeError: System Admin.contains not a function
I am trying to delete the related records on click of a button which is working fine.Now i want the delete logic to work only the profiles which contains 'xyz' in their name.
I am getting an error '...
-1
votes
1answer
24 views
want to populate input field according to the checkbox [closed]
Here is my code.
<apex:page standardcontroller="sample__c" sidebar="False" extensions="PropertyExtensionClass" action="{!sampCalc}">
<apex:form id="myForm">
<apex:pagemessages /&...
0
votes
1answer
16 views
disable textfield if other text fields depending on another field
I am trying to disable one of my input field, if the vlue in other text field is not '0'.I am not sure what is going wrong.Can you help.
<apex:page StandardController="Account">
<script>...
0
votes
1answer
27 views
Facebook does not allow Javacript to add my profile picture while integrating facebook and salesforce
Access to scontent.xx.fbcdn.net was denied 403 error.
I made call on graph api as 'https://graph.facebook.com/me?fields=id,name,email,picture&access_token='+token
I got response as :
{
"...
1
vote
1answer
70 views
Radar chart using Chart.js not working
I am trying to follow the chart example listed in salesforce doc and a blog, i am getting an error on the JS load functionality as below and the charts are not getting loaded and i get the error ...
0
votes
0answers
32 views
How can I redirect a url when a record is saved, using an On-Click Javascript custom button?
In particular, I´m trying to do this for the creation of a campaign member. Right now, if I add a contact to a campaign and then click "Save" on the campaign member edit page, I´m taken to the ...
0
votes
1answer
23 views
Is there a way in Lightning to execute JavaScript on all pages like Sidebar in Classic?
We developed JavaScript for Classic UI that executes a call out to Segment as a means of establishing and tracking presence for our Users. Since this does not attempt any DOM manipulation, it works ...
1
vote
2answers
38 views
Lightning component : call apex function after window.location
In lightning, is it possible to call an Apex function just after a window.location.href ?
For example I have a function that save a pdf from a visualforce page into attachment, and in the lightning ...
0
votes
0answers
16 views
onchange() javascript on master picklist breaks dependent picklist values
I have two custom picklists, one master and other as dependent.
<td><label>SSR Master Field</label>
<apex:inputField id="ssReq"
onchange="...
0
votes
0answers
24 views
How to observe object attribute change without observing other attribute changes in Lightning Aura?
I have one component:
<aura:component >
<!-- testing change event -->
<aura:attribute name="testObj" type="Object"/>
<aura:handler name="init" value="{!this}" action=...
0
votes
0answers
11 views
disable the custom button based on the status in standard layout
I need to disable the custom button on Opportunity layout based on some statuses, I am not using the VF page here. Written piece of Javascript code in custom button. How we can implement this?
0
votes
1answer
10 views
Error Message on custom button to replicate validation rule
I am using a custom button and am having issues with the error message displayed to the user.
The error message is kicking in because the "service_lifecycle_status__c" field is not set to "Beta", ...
0
votes
0answers
10 views
How to create the custom tabs in visualforce page using custom object?
I need to create four custom tabs, It contains individual information.How to create the custom tabs in visualforce page using custom object ? please help me and give me any related examples.
-1
votes
1answer
25 views
Adding clause criteria based on logged in user to custom button [duplicate]
I need to add an statement into this custom button so that it only runs if it meets a certain, how would I do this?
The statement essentially needs to say if the logged in user is equal to the ...
0
votes
1answer
27 views
How can I fetch an attribute from a string in javascript
I have below string in my javascript variable which is returned from the controller as a wrapper value. I need to fetch the value of "Tasks" attribute from the javascript string variable on my vf page....
1
vote
1answer
28 views
How do I display error message using custom button?
When the user clicks a button called "convert to service catalogue" it should trigger the creation of a new record. In some instances, this will fail, because the user logged in clicking the button ...
0
votes
1answer
28 views
Get the value of a picklist in lightning
I have a picklist that displays a list of articles, and I want that when an option is selected (by clicking the mouse or the enter key) I can access the value of this option.
For now I have the list ...
0
votes
1answer
21 views
Javascript Visual Force
I need to get the value of below control using javascript.I am getting null every time I am using the below javascript code
<apex:inputCheckbox value="{!selectedVal2}" id="mychkbx" onchange="...
0
votes
1answer
18 views
Not getting contact Id in custom button Javascript
I am not getting Contact ID in my javascript custom button that I have created in Quote
the button exist in Quote Line Item Page
{!REQUIRESCRIPT("/soap/ajax/20.0/connection.js")}
getMsg();
...
0
votes
0answers
26 views
sforce.interaction.searchAndGetScreenPopUrl callback not executed from Visualforce page
I have setup a Salesforce console component that holds the following Visualforce page.
<apex:page >
<apex:includeScript value="/support/console/38.0/integration.js"/>
<apex:...
0
votes
1answer
27 views
JavaScript reading visualforce binded variables
I need some help understand how JavaScript and Visualforce interact.
I have a eventListener that works perfectly when the DOM is loaded:
window.addEventListener('DOMContentLoaded', function() {
if (...
0
votes
1answer
22 views
Assigning value from javascript to action:status div tag
I have this below javascript where i am getting values from input field - The below function is called onchange event in input field.
<script language="javascript">
function ...
0
votes
0answers
17 views
reRender and onload
Is it possible to use element onload after a reRendering of a div?
My div: populatedChart is reRendered after a button click and is populated with data. Once the div is loaded with the data, I want ...
1
vote
1answer
32 views
User validation on Custom Button
I have a custom button on the Product object that I only want to run if the current logged in user is either the record owner, a specific user id, or a sys admin profile. How would I do that? Below is ...
0
votes
0answers
34 views
Added Onclick Java Script Alert into Detail Page Button
I am encountering some issues and it has me stumped, and hoping the community can help me out.
The aim here is that when the user pushes the custom button an alert should pop up saying:
"By ...
0
votes
2answers
34 views
getElementById inside an apex composition
I am having a difficult time trying to get an input text value from an element that is inside a template.
I notice when inspecting the page that between the tags of define and the form the page is ...
1
vote
1answer
17 views
Java Script button - error for some users
i have a Java script button that is throwing an error message but is still working. Its only throwing this error for some users so I believe its about permissions but its not obvious what it is? I ...
0
votes
2answers
27 views
document.getelementbyid returning null
<apex:page controller="" showChat="false" showHeader="false" sidebar="false" standardStylesheets="false" docType="html-5.0" cache="false" title="" >
<apex:composition template="dsfdsf">...
1
vote
1answer
30 views
Binding a click event to document Lightning Component
I am using SLDS Picklist in Aura Component, I am trying to close the picklist when user clicked outside the picklist. I am trying to bind a click event to document and call the action to close the ...
1
vote
2answers
47 views
Click outside of popover to hide?
I'm trying to do the popover shown on the lightning tutorial: https://www.lightningdesignsystem.com/components/popovers/
I'm new to lightning and I have been looking around on how to hide the popover ...
0
votes
3answers
26 views
Block an action from executing via Javascript Function
I have the following commandLink
<apex:commandLink value="Save" onClick="Validation();" action="{!ActionMethod}" />
When it's clicked, I would like to stop the action from executing by ...
0
votes
1answer
13 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
8 views
Add EventListner for Mouse move on salesforce console
Is there a way in salesforce to found that user has done recent activity on service cloud console window.
We are using this code through custom console component which is hidden.
we tried following ...