I would recommend to go through this trailhead module to get started with Visualforce. To answer your question, your Visualforce page is using Custom Controller. So in order for your code to work, you must define you own save() method in the controller class. Save and Cancel are standard controller methods. Unless you use standardController, it won't work. ...


Bodylength - Size of the file (in bytes) of the attachment. Unfortunately, You cannot add this field on notes and attachment-related list as this is not customizable. The workaround is you can create a simple custom Lightning Component to show attachment as a table.


I think you have an incorrect logic here: public InsertCandidatecontroller() { if(can !=null) { can = new Candidate__c(); } insert can; } Shouldn't you instantiate a new Candidate__c object when it is null? if(can == null) { can = new Candidate__c(); }


This doesn't work because you can't get elements by ID using the approach you have applied. This is because IDs get mangled by the Visualforce page in order to ensure they are unique. Take a look at the documentation. You need to access the elements using a different approach, such as via using a data-id attribute. This attribute doesn't get mangled but can ...


Remote functions are asynchronous by nature. There's no such thing as synchronous calls in JavaScript these days, because they cause the page to become unresponsive while they're processed. However, you can simulate this in your code using async await: async function remoteAction(var1, var2, var3, var4, var5) { return new Promise((resolve, reject) => { ...

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