New answers tagged

0

Additional case that it can happen- if you lots of classes/trigger and you use the button 'Compile All', then this process might take few minutes (and you cannot stop it). During this time the organization is locked for changes and you just have to wait few minutes.


0

I was messing around with the same in 2021 and the user was not popping up for Traced Entity Name in debug logs. Did some findings and found that Salesforce has taken up back the process to inject cookie in web-browser in order to do enable the debug logs in the release of spring 18. To trace the guest user, now we need to follow these simple steps to find ...


1

The explanation for the page to not ignoring your permission when seeing it, is likely what Adrian Larson states in the first comment. However, the explanation for you DMLs resulting in errors when you are not enforcing CUD (note that you are still missing checking the FLS, which should be done) is probably just because of the fact that you are using ...


0

its not clear how your elements are positioned. As is, there is nothing in your styling that indicates that there should be any padding or a margin between your "text" and your "image" so it's not clear what issue you are facing. Assuming your elements are placed horizontally, you can either add a right padding to <div align="...


0

When you say "relaod page" I'm assuming you mean when the page refreshes due to action method updateSelectedTemplate (the return null). Normally, one simply makes the action method void if you are not causing a new Page to be displayed (wizard-style or redirect) I would suggest you make the selectOptions a lazyload and move the docusign call into ...


0

In support of @Dan Jones' answer, I'd like to point something out: You cannot change a field type if there is a reference to that field in any code or automation, including deactivated items. If you really want to change the field type, you need to delete all of the code that references it, make the change, then put all the code back. Doing the above is ...


1

Please check below code <apex:page controller="CheckboxValueC"> <apex:form > <apex:inputCheckbox id="checkboxShowP" value="{!isChecked}"> <apex:actionSupport event="onchange" action="{!click}"/> </apex:inputCheckbox> </apex:form> </...


0

This simple method helped in various long text wrapping problems where the wrapping delimiter can be adjusted to the output wrapping limitations: public String breakLongStrings( String strInput, Integer maxLength, String wrappedDelimiter) { String finalString =''; // Add chunks in the maximum allowed word length blocks do { ...


0

As per your requirement you have not specified correct directory name which is cats. <apex:page> <apex:image url="{!URLFOR($Resource.vfimagetest,'cats/kitten1.jpg')}" /> </apex:page>


0

The record(s) you get from a StandardController or StandardSetController only contain the fields that are rendered in your Visualforce page (as I recall, adding something like html-style="visibility:hidden" or rendered="{![something that evaluates to false here]}" causes Salesforce to not automatically pull in that field). The general ...


2

The class CreateQuotePDFController_Test contains no unit test methods. It contains only a test data setup method, data_setup(), which appears to also contain the start of a unit test but no assertions to validate behavior. You need to write at least one actual unit test method. Please review How do I write an Apex unit test? for introductory resources. Every ...


3

When you are refreshing a page from the browser, it sends the same form data to submit. The viewstate of the page is also sent. That's why you preserve this button disabled. You can use rerender attribute of the apex:commandButton and specify id of the parent form to exclude resubmitting form with a viewstate: <apex:page standardStylesheets="true&...


0

So by using backslash \ in a string like Pates de L\'Ile will make string like this Pates de L\'Ile and the value coming from oppli.Product2.family is this Pates de L'Ile so both strings are not equal. To solve this using JSENCODE() which will add backslash \ in a string like {!(JSENCODE(oppli.Product2.family) == 'Pates de L\'Ile' && rowNum == ...


0

@isTest public class CreateQuotePDFController_Test { @testsetup static void data_setup(){ Account acc1 = new Account(); acc1.Name = 'test account'; insert acc1; system.debug('insert acc1 is success'); Opportunity Opp1 = new Opportunity(); Opp1.Name = 'testOpp'; Opp1.AccountId = acc1.Id; Opp1.StageName = 'Closed Won'; Opp1.CloseDate = ...


1

Try adding something like this to CSS table { page-break-after:auto } tr { page-break-inside:avoid; page-break-after:auto } td { page-break-inside:avoid; page-break-after:auto } thead { display: table-row-group; } tfoot { display:table-footer-group }


0

Your Lightning App markup is incorrect. It should be: <aura:application access="GLOBAL" extends="ltng:outApp" implements="ltng:allowGuestAccess"> <aura:dependency resource="markup://c:EntireSiteComponent" /> </aura:application> Everything else appears to be correct.


0

Figured it out: namespace + 'SomeClass.someMethod' resolved to namespace__SomeClass.someMethod, instead i need to input namespace.SomeClass.someMethod


2

In programming (in general, not just on the Salesforce platform), when you have a string that contains a character with a special meaning, you need to escape that character to be able to use it. "Escaping" a character tells the underlying system to treat this thing differently than you normally would. The way you "escape" something is ...


1

You should be able to do this (note the R$ as part of the value of the outputText: <apex:outputText value="R$ {0, Number, ###.###.###.###.##0}"> <apex:param value="{!produto.TotalPrice}" /> </apex:outputText> and then it is not clear why you need the controller method at all


2

You seem to have true and false backwards. The poller will never be enabled, because the default value is null, which is considered false. Further, the default value is null, so the render property will always be true, with no way to update. In addition, you're not reRendering the zipFiles section. Note that it's probably a bad idea to leave batchComplete as ...


0

So, your issue is that <apex:outputField value="{!Endereco.Recibidor_de_mercaderia__r.Rua__c}"/> is accessing the method public List <Opportunity> getEndereco(){...} But the outputField renders a scalar and the method returns a list. In Visualforce, to display collections, you need to define markup that iterates over the collection ...


1

CDNs are not recommended by Salesforce instead you should use static resources by going to Setup -> Static Resources and upload each CSS individually or all in a folder. Then use the following syntax to load the scripts. <ltng:require styles="{!$Resource.jsLibraries + '/styles/jsMyStyles.css'}" scripts="{!$Resource.jsLibraries +...


0

As @ytiq mentioned, you can do it with CSS but use page media and CSS counter function as shown on the Help page. As far as I know, there is no page counter on Visualforce functions or controller, so unless you develop something custom, you won't be able to do that.


0

If you want to display the field, you need to use __c: <td><apex:outputText value="{!Endereco.cpf__c}"/></td> To display the string you defined, you need to make it public and have a getter: <td><apex:outputText value="{!cpf}"/></td> ... public String cpf { get; set; }


0

Welcome to SFSE. I believe you'll want to use <apex:outputText> along with a corresponding number format, but I'm not sure that's going to work when you've got a String in the controller and multiple .s in the output. Your best bet is probably to write an Apex method that takes a String parameter, and builds up the output you want, using substr and the ...


0

I believe the problem is you are trying to match name to id, which is wrong. Instead match Id to Id: public List<contact> getContacts() { return [SELECT Name, Phone, Email FROM Contact WHERE AccountId = :con.accountid]; } Update: standard controller is redundant here. This is the was how this can be refactored <apex:page sidebar="false&...


0

These are custom permissions. Custom permissions let you define access checks that can be assigned to users via permission sets or profiles, similar to how you assign user permissions and other access settings. Custom permissions can be used in the "Audience", to control the visibility. Following is the link to the documentation for the creation ...


0

The issue ended up being a mistake in the value provided in the storefront Field on the CC Page Label record


1

You're subtracting the hours from the day of the month. Notice how it was working on the 24th, which means you were doing 24-24, which equals 0. You'll want to use getHours() instead: function removeDaysToDate(date, hours){ var res = new Date(date); console.log('res ->' + res); console.log('hours ->' + hours); res.setHours(res.getHours()...


0

As the error says, you're trying to put an Account in to a List<Account>. This isn't legal in programming languages that have strict data types, such as Visualforce/Apex. <apex:attribute name="account" description="" type="Account[]" /> Should be: <apex:attribute name="account" description="" ...


0

You can use scrollIntoView, you just have to be selective (pun intended) about it. Here's a copy-paste example for you to get started: <apex:page controller="q358473"> <style type="text/css"> .scrollable { overflow-y: auto; /* make it scrollable if needed */ height: 20.5em; /* non-integer height ...


0

Your code has a number of problems, which we'll address here. First, you have queries inside of loops. You need to refactor this to avoid governor limits. You can't just run unlimited queries like that. Second, you forgot a field in your query on line 19, which is the original cause for your error. Third, you're mapping by Name, which may not be unique, thus ...


0

The reason for your error is that con needs to be publicly accessible to the VF page but you have it declared as a method variable: public void AccountSelected() { contact con=(contact) StdCtrl.getRecord(); // This is a variable scoped inside a method ... to fix this, declare con outside of any method public Contact con {get; set;} and change your ...


0

What seemed to work for me was to replace window.open(generatedUrl); with window.location.replace(generatedUrl); In addition I used formFactor to apply logic in case desktop needed different behaviour to mobile. import FORM_FACTOR from '@salesforce/client/formFactor';


-1

Per the documentation: Visualforce pages that use the Standard Controller can’t be used in dashboards You'll need to write a custom controller for this page.


0

You say that the "controller is defined without sharing". Then it shouldn't matter for the Guest user if it has access or not. Does the update action happen in the same controller class or in a different one (aka "helper") that may be "with sharing"? It would be helpful if you share the code. Also, LWC or any other framework is ...


0

I used another way. <span class="slds-icon_container" style="background-color: #49648C;"> <svg aria-hidden="true" class="slds-icon slds-icon_small"> <use xlink:href="/apexpages/slds/latest/assets/icons/standard-sprite/svg/symbols.svg#{!IF(...


Top 50 recent answers are included