3

The experience you get with LWC entirely depends on whether you use standard components or your own code. In Visualforce you get FLS automatically applied when you use the apex:outputField or apex:inputField for example, and you will get the same sort of result when using the uiRecordApi within LWC, where FLS is automatically applied. On the other hand, if ...


2

I believe I have found a solution. Inside of the vscode settings file the following line needs to be added: "prettier.documentSelectors": ["**/*.page"] Per prettier vscode documentation found here: https://github.com/prettier/prettier-vscode#prettierdocumentselectors 'A list of glob patterns to register Prettier formatter. Typically ...


2

No, there is not. You can only render HTML and images. You would need to store your other document as HTML if you want to render it in the PDF.


2

The following CSS would do this: .text-title-case { text-transform: capitalize; }


2

You will need to first create a Content Version Record and then a ContentDocumentLink record. ContentVersion fileToUpload = new ContentVersion(); fileToUpload.ContentLocation = 'S'; // Salesforce. The other option is: 'E' fileToUpload.pathOnClient ='samplefile.pdf'; fileToUpload.title = 'Sample File'; fileToUpload.versionData = Blob.valueOf('...


1

When you use a standard controller, the id parameter in the URL must belong to the same object. For example, if you are using the Comments__c standard controller, the id parameter must have a Comments__c record's Id. In your case, you are sending the Approval__c record's Id which is why you are getting an error. Update your URL to use a different parameter ...


1

Assuming it needs to be JavaScript, just add a CSS rule: CS.EventHandler.subscribe(CS.EventHandler.Event.AFTER_SHOW_SCREEN_ACTION, function (payload) { //? Test functionality... document.styleSheets[0].insertRule("#addonman { display: none; }"); }); By adding it as a rule, you can technically do it whenever you want, even before the button ...


1

This code should be counting from -2 to +2. You thought you were setting the month, but you're adding an offset instead. Consider the first month. You end up doing 9 minus 3 to get 6, so then you're adding 6 months to 9, which rolls over to March of next year (9 + 6 = 15, so we modulus 12, to get to month 3, or March). We fix this by counting from -2 to +2, ...


1

This issue is identified in all Winter 22 sandboxes. This issue has been fixed by prod team .while there is no KI created for this, it has been fixed under #W-9869612


1

You didn't specify the apex:pageMessages id in the rerender attribute, so it's not getting updated when the button is clicked. Set both items to rerender. <apex:commandButton value="Calculate" action="{!calculator}" reRender="xyz,showmsg" /> In addition, it appears that the default value when the field is blank is being ...


1

Could you create another css resource directly and load the rule as you were setting dynamically? [data-cs-type='add'] { display: none; } The issue is that the button rerender the page (if not reload), or a portion of it, so that all the content set dynamically is removed as the page is generated again. You would need an oncomplete event after the action of ...


1

Visualforce pages rendered as PDF do not include any JavaScript and are not interactive. This simply isn't possible with the renderer used to create PDFs (Flying Saucer).


1

Try the below code for error messages catch (System.DmlException e) { System.ApexPages.addMessage(new ApexPages.message(ApexPages.severity.Error,e.getMessage())); return null; } Also on your visualforce page make sure to use the below tag <apex:pageMessages id="showmsg"></apex:pageMessages>


1

I think the documentation may be outdated or may have omitted this value. It is a standard label, as it exists in my org, and I definitely have not set up a custom label by this name.


1

Maps are unordered collections, so the parameters can be ordered any way the platform chooses. And unfortunately, it chooses to be lexicographical by key name. This happens even if you put them directly in the URL: PageReference ref = new PageReference('https://www.google.com/?q5=value1&q2=value2'); System.debug(ref.getUrl()); // Output: https://www....


1

Visualforce enforces Field Level Security for all fields. This means a user needs to be able to edit a field to have the page allow editing. When viewing from a Site, you are logged in by default as a Guest User, which is a different profile. You need to make the field editable for this profile. Go to your Site, click on Public Access Settings, then go to ...


1

You can use the ::placeholder pseduo-class: <style> .subscriptionNumberInput::placeholder { font-size: 50%; } </style>


1

I'm going to offer a minor update on sfdcfox's answer as it was very helpful to me. PageReference getContent() and getContentAsPDF() methods now behave as Callouts. I dealt with this by implementing queueable apex as follows: public without sharing class PdfGeneratorHelper implements Queueable, Database.AllowsCallouts{... Database.AllowsCallouts is required....


Only top voted, non community-wiki answers of a minimum length are eligible