Questions tagged [visualforce]
Visualforce relates to questions where the Visualforce language or framework are concerned. This is primarily VF pages, components, PDF rendering, and email templates. This would only cross-over to Lightning where Lightning Out (Lightning for VF) or VF pages using SLDS or being used in LEX. Where a question relates to Apex invoked as part of a VF page, this tag would also be appropriate.
16,697
questions
0
votes
0
answers
17
views
How to resolve Stored/Reflected XSS for arguments passed to JS functions in a VF page?
Overview:
I am looking for ways to bypass Stored/Reflected XSS issues that are showing up as part of CheckMarx Scan report for the arguments passed to js functions in a VF Page, given that queries in ...
-1
votes
0
answers
12
views
Making input field required and unrequired based on another input field value using javascript function in Visualforce page
After page fully loaded, I want to make the first in inputfield tag can change to required and unrequired based on another input field value using javascript function in Visualforce page.
When I am ...
-2
votes
0
answers
23
views
Render VisualForce Page as PDF and send as an attachment to group of people [closed]
We have a requirement like this: There should be a button on Opportunity page and once end user clicks on the button, it should open a page which should auto populates some of the information from the ...
0
votes
0
answers
22
views
Do UserInfo.getSessionId() is allowed in 2GP Managed Package VF page for calling tooling API?
Context:
We are currently working on AppExchange app development, which requires us to create dynamic trigger on the particular object as part of admin configuration.
On AppExchange configuration ...
0
votes
0
answers
17
views
Checking unchecking inputfield checkbox in visualforce page
public Boolean getRenderComplaintsFields(){
renderComplaints=false;
if(theCase.Function__c == 'Complaint' || theCase.Request_Type__c == 'Complaint'
|| (theCase.Function__c == 'Group Claims' && ...
0
votes
0
answers
17
views
Configuring CMS Connect Header Source to point to Visualforce Page being blocked?
What I configured :
I created a VF page that calls a custom tag e.g. that displays the header UI perfectly when I press the preview button. Also in the VF settings I made sure to :
Tick the "...
0
votes
0
answers
37
views
How do I turn a base64Encoded PDF file into an open PDF with apex
We are trying to make an integration app for salesforce. The flow is:
User Clicks a button
Salesforce sends data to our system
Our system returns a PDF document
That PDF gets displayed for the user ...
0
votes
1
answer
32
views
Help with aura component that works in standard org but not works in partner portal
I have this custom component that displays a Visualforce page and email templates. In the org it works as it should, but in the partner portal it doesn't give me the same result. It already exists a ...
0
votes
1
answer
36
views
Unable to hide/unhide second field based on picklist inputfield value
Visualforce Page:
<apex:outputPanel id="Complaint" >
<apex:pageBlockSection title="Complaint" columns="2" id="Complaints" rendered="{!...
0
votes
1
answer
58
views
Apex action function method is not getting called, only the page is getting refreshed/rendered
Here in the below code when i click commandbutton(test() function) js function is getting called and after that page is getting refreshed and it is not calling the action function method. {!...
0
votes
1
answer
29
views
Getting Unknown method error in visualforce page, even though the method present in controller [closed]
Method
public Boolean getGeneralInsurance(){
If(theCase.customer__c == 'yes'{
IsCustomer =true;
}else{
IsCustomer= false;
}
return IsCustomer;
}
<apex:...
0
votes
1
answer
20
views
How to test Salesforce Sites Error Pages
I override the standard error pages for a Salesforce Site (Not Found, In Maintenance, Generic Error) with my own Visualforce pages.
How I can test In Maintenance and Generic Error pages?
I tried to ...
0
votes
0
answers
23
views
Clicking on the visualforce link used in LWC component from mobile device, the related visualforce controller class is executing twice
I am embedding a visualforce url with an image in LWC component through app builder page. I have defined the image property in the xml file.
<template lwc:if={mobileView}>
<div class=&...
1
vote
1
answer
40
views
VfUnescapeEl rule for SelectOptions Value in apex:repeat used in Javascript on Visualforce page
I have SelectOptions variable objectFieldTypes in Apex Class, I bound certain values in this variable. I am using this in Javascript on Visualforce Page Like this
<script type="text/javascript&...
-1
votes
1
answer
57
views
I want to auto check the checkbox and rerender the other components in visualforce page when a condition met in controller method [closed]
I have a Boolean method which checks the condition and return a Boolean value based on the condition result. I need to rendered this method in vf page and need to made checkbox field to be auto check ...
0
votes
1
answer
33
views
WebToCase form is not generating cases in Salesforce
We have a VF page for Web to Case form.
when we click on submit, case is not getting created. Request is getting queued.
Getting debug logs as below.
Your request has been queued.
Record Information:
...
-1
votes
2
answers
27
views
Is there a way to instantiate a VisualForce page in the background from Apex code and then grab the text from it?
I'm thinking way back and thought I remembered that this can be done but am not sure and if so how.
In Apex, I want to generate some text, so I instantiate a VF page passing it some parameters, then ...
0
votes
0
answers
43
views
Returning to list view after executing a custom button implementing apex class
I have a custom button on my list view whose source is a visualforce page. The visualforce page executes an apex class which updates certain records based on a field values on load using action ...
0
votes
0
answers
43
views
Error displaying vf page in lwc through iframe
I have a visualforce page which i need to show on a community using lwc. I am using the iframe in lwc to display that.
<iframe id="LWCWithVFPage" src="/apex/testVfpage" width=&...
0
votes
1
answer
88
views
Change the presence status of a user via an API
From an external app I would like to change the presence status of a user via an API. I was not able to figure out if there is a public API but found this js code that supposedly works in an apex vf ...
1
vote
1
answer
29
views
Does <apex:outputText> as any character limitation
Does <apex:outputText value="some text"> as any character limitation? Can it accommodate text up to 32k characters?
0
votes
0
answers
18
views
apex:comandButton not rendering when given an action
I have a VF page with an apex:comandButton. This does not display if i give the action attribute. It renders fine if the action attribute is removed.
To work around it i thought i would create an ...
0
votes
1
answer
44
views
how can we handle fixed width and fixed height, float or position: absolute or fixed in aura components in security review
.THIS .slds-docked-composer{
float : right !important;
}
.THIS .messageInput {
height : 380px !important;
width : 320px !important;
}
How can we avoid using of fixed height and fixed ...
0
votes
0
answers
37
views
Can you create a Visualforce Page that fills the entire document body?
I've created a test Visualforce page in a test app.
Is it possible to setup your own page without this standard Salesforce header at the top? So no tabs, global search or setup icons - just an empty ...
0
votes
0
answers
24
views
Variable does'nt exist error while pushing the source code to the scratch org
I have tried to push the source code to my scratch org using this command sfdx force:source:push
I'm getting component failures and deployment is getting failed below are the errors
Variable doesn't ...
0
votes
0
answers
23
views
Displaying message on terminated session device and redirect to community login page
We have a login flow in our community. If a second user logs in with a user that is already logged in, it terminates the old session and continues with the new one.
There is no issue with terminating ...
0
votes
1
answer
29
views
VisualForce page data not displaying after adding to 'Notes and Attachments'
As the below given, there is a quick action in Account page, which enters Contact details and on saving, it redirects to the Contact page where a pdf is attached in the 'Notes and Attachments' of ...
0
votes
1
answer
49
views
How to increase file upload limit to 100 mb using visualforce page in salesforce
Currently using apex:inputfile in vf page to upload image which have a hard limit of 10MB And my requirement is finding a workaround to increase the limit to 100MB.
Approach I am trying is created an ...
1
vote
1
answer
66
views
In LWC Visualforce iframe not showing in experience site
I have assigned visualforce and apex class on guest user profile.Also i enabled Available for Lightning Experience, Experience Builder sites, and the mobile app. But still in experience its showing an ...
0
votes
1
answer
96
views
Why Rich-Text Image URL not getting updated in record?
Why before Insert or Update doesn't update the RichText Image URL?
To Replicate
New Field:
Created a new RichText field in case object 'Comments__c'
Take a screenshot and paste the image field.
...
-1
votes
1
answer
57
views
How can I inject an Account Id into a vf page url after redirecting to that page?
We currently have a basic homepage for our experience site which we think it pointless and want to replace with a custom vf page that is an account record page.
If a user logs in through the log in ...
1
vote
1
answer
41
views
@RemoteAction - static method variable access
is there any way to access the variable outside the method and inside the same class?
'selectedvalues' List variable is declared as static variable in same class
@RemoteAction
public static List<...
0
votes
0
answers
89
views
Navigate to LWC page from a custom button on an object using Lightning:UrlAddressable
I want to open a LWC page (a form) in a new page when clicking on a custom URL button on a standard object page. The issue is I don't know what the button URL should be, and how to properly wrap it ...
0
votes
0
answers
28
views
Debug log shows data in list of the Controller Class but Visualforce page is not displaying anything
The debug logs of the Controller class show the correct data in the list that I have used to split (questions and answers) but while using the same to display it on the vf page it is not displaying ...
1
vote
1
answer
32
views
Coding an unsaved changes check on a visualforce page
I'm very new to VF pages, so apologies if this is an obvious question. I've built a VF page that is essentially just a big text box. I would like to throw an "Unsaved Changes" message when ...
0
votes
0
answers
33
views
Is it possible to create a Pie chart using VF page that shows all the aggregated fields from a report
VF Page::
<apex:page controller="TestDanixController">
<head>
<apex:includeScript value="https://cdn.jsdelivr.net/npm/chart.js"/>
</head>
...
0
votes
0
answers
31
views
Layout Issues in Lightning Experience (Working Fine in Salesforce Classic)
I'm encountering a layout issue in Salesforce Lightning Experience that does not exist in Salesforce Classic. In Salesforce Classic, the page layout displays correctly, with all fields and columns ...
1
vote
1
answer
61
views
XSS attack on a Boolean variable
Checkmarx is detecting XSS vulnerability on my code which contains a boolean variable is_Private_Label__c.
Is there any way to fix this issue as we can't add the JSENCODE here as the data type is ...
0
votes
1
answer
144
views
Why am I able to see a lookup record's name field if I don't have access to the record
I have an Object A and that has a look up to an Object B. There is a record A1 in Object A and there is a record B1 in Object B. Record B1 is a lookup on A1. The user has access to record A1, but does ...
0
votes
0
answers
31
views
I want to get rowid in vf page table . List has no rows for assignment to SObject
Controller class
public class BankDetailsController {
public list<Bank__c> banklist {get;set;}
public boolean displayPopup {get; set;}
public boolean displayPopupTwo{get;set;}
...
0
votes
1
answer
31
views
VF page not loading when I updated the API version
Our project is updating all the Pages/Components which are below API version 30 and as part of which I have updated the SOAP API version of an existing VF page from 29.0 to 56.0. But while testing I ...
0
votes
1
answer
41
views
Visualforce component not triggering getters
I have a task to create a email template which uses a visualforce component with some tables of data on Leads. The email did not show the tables properly so I put the VF component on a VF page to ...
0
votes
1
answer
40
views
Property type misidentification in VisualForce Page
I'm deploying all the code from a 1stGen Package to a new Scratch org, to improve our development/testing/release process.
There were a few deploy errors but I've fixed all but two types. This is one ...
0
votes
0
answers
109
views
Prettier, in VS Code, failing to format SOME VF Pages
I'm using Prettier, along with the plugin prettier-plugin-apex in VS Code, to format Salesforce classes and Visual Force pages etc.
It works (formats my docs on Save) most of the time, but now some, ...
0
votes
0
answers
86
views
Image is rotating to left in Visualforce Page using RenderAs="pdf"
I'm facing an issue: I'm creating a PDF and using the image stored in the files object. I'm creating a Visualforce page with RenderAs="pdf". The image is appearing, but it's rotating to the ...
1
vote
1
answer
54
views
How to wait for a VisualForce script to execute when calling it from an Apex method via PageReference?
I have an Apex controller MyController which calls a VisualForce page via PageReference.
Here is my controller:
public with sharing class MyController {
@AuraEnabled
public String param1 { get;...
0
votes
1
answer
39
views
Changing the layout of the standard button for the custom object
there is a change owner button standardized by salesforce. They want to add another checkbox on the layout of this button. How can I add this field to the layout of this button? Note that It shouldn't ...
1
vote
1
answer
39
views
Show record list after inputFile in visualforce
I have a problem with inputFile and commandButton in visualforce when to try updating list value during upload CSV file. My problem is list value inside PageReference method is not shown and instead ...
0
votes
0
answers
51
views
Extra Page When Printing Web Pages in Lightning Experience
When printing web pages in Lightning Experience, there is always an extra page. This is true for any Record pages, App Pages from Lightning Component or Lightning Page Tabs.
Adding css in Lightning ...
1
vote
1
answer
81
views
renderAS="pdf" not converting to hebrew language
im using renderAS="pdf" in my vf page, when it converts to pdf file it does work fine for english text, but the pdf is not converting to hebrew language. Is there a way to do it ? using ...