4 votes
Accepted

Need help understanding get/set methods, weird behavior

I have observed Apex properties - a convenient way to implement getters and setters - only being referenced once even though the Visualforce includes multiple references. It seems like there is some ...
Avijit Das's user avatar
  • 1,396
4 votes
Accepted

Why does this VisualForce page think I'm referencing a Controller variable, instead a field inside of that variable?

Because your key should be a string, not a property. You are referencing a property (that doesn't exist) with the syntax you have used. It's the same as the difference between merging {!profile_type} (...
Adrian Larson's user avatar
  • 149k
3 votes
Accepted

Is it safe to reference property's directly in getter/setter in apex?

Yes, the method of storing data as in the first example is outlined in the documentation, and fully supported. Other languages have the limitation of needing a backing variable simply because the ...
sfdcfox's user avatar
  • 476k
3 votes
Accepted

What is the difference between the Name and the CustomerKey of a data extension?

The Data Extension Name is user defined name provided to Identify the DE among all other several DEs. DE name must be Unique accross BU [MID] User has to provide the Name of the DE Mostly used in ...
Vishal Kumar C V's user avatar
3 votes
Accepted

Performance comparison between LWC Reactive property and javascript Property

For completeness, there are six distinct scopes. They are, in order of largest to smallest access: global, import, component, instance, closure, and local. Global scope is only available in LWC OSS. ...
sfdcfox's user avatar
  • 476k
3 votes
Accepted

Apex Final Property Behaves Like a Member Variable

If you don't provide a property for the final default getter setter property, it also runs just fine instead of "System.FinalException: Final variable has already been initialized". ...
sfdcfox's user avatar
  • 476k
3 votes

Deployment Error: Property 'activateRSS' not valid in version 28.0

Using <activateRSS>true</activateRSS> solve the issue. Though <activateRSS xsi:nil="true"/> this was giving error. So Ideal package.xml would look like this <?xml version="1.0" ...
Ankuli's user avatar
  • 726
3 votes

Deployment Error: Property 'activateRSS' not valid in version 28.0

There is the Known Issue - Summer'18 - unrecognized field activateRSS on InstalledPackage while using MetaData API, which indicates it should have been resolved in SUMMER '18 PATCH 10.1 and is ...
Daniel Ballinger's user avatar
3 votes
Accepted

What is the difference between a variable and an automatic read-write property?

The main reason why there is a distinction is because of Visualforce. You cannot access a variable in Visualforce, but you can access a property. To illustrate this at the most basic level, consider ...
sfdcfox's user avatar
  • 476k
2 votes

Need help understanding get/set methods, weird behavior

In salesforce "get" method is used to pass data from your Apex code to your Visualforce page and "set" is used to pass data/value from visualforce page to the controller variable. So basically when ...
Nilesh Borse's user avatar
2 votes

Passing values to property LWC

Your code is working. You're getting tripped up by asynchronous callbacks. The code executes in this order: // 1 this.checkImageExists(result['frontImage'], function (...
Andy Ray's user avatar
  • 1,359
1 vote
Accepted

Can i create changing variable in apex class

You can use variables in your SOQL expression to change the limit and offset e.g. Integer anOffset = 75; Integer aLimit = 75; List<Contact> contacts = [SELECT Id FROM Contact LIMIT :aLimit ...
Aidan's user avatar
  • 13.5k
1 vote
Accepted

How do I use custom properties that include a colon (like <div :data="data">) in Visualforce?

First, in vue, the colon syntax is short for v-bind. So instead of :per-page you can use v-bind:per-page. Second, Visualforce's XML parser will interpret v-bind as a namespace, so you need to ensure ...
Charles T's user avatar
  • 10.9k
1 vote
Accepted

Passing values to property LWC

this.checkImageExists(result['frontImage'], function (existsImage) { This causes this to become the function scope. Stick with the arrow notation: this.checkImageExists(result.data.frontImage, (...
sfdcfox's user avatar
  • 476k
1 vote

Difference between using and not using get; set; in data passed from backend

The { get; set; } code is only obligatory for Visualforce pages that bind to those variables. In all all other cases, { get; set; } is superfluous, and not required. This includes using those ...
sfdcfox's user avatar
  • 476k
1 vote
Accepted

Difference between using and not using get; set; in data passed from backend

On the one using the get; set; you can control if get; or set; is private or not by using private get; and private set; ... Mostly you use properties for Visualforce pages. So Apex properties are ...
Carlos Naranjo's user avatar
1 vote
Accepted

Update Field Properties

Updating metadata information is not possible in apex yet. If the functionality is critical for business, you can try using Apex Wrapper for the Salesforce Metadata API by Andrew Fawcett.
Raul's user avatar
  • 18.7k
1 vote
Accepted

Repeater 's text box value getting null in method

String pgp=''; if(objmappost.size()>0) { for(String key:objmappost.keySet()) // map you had binded in the outer repeater. { if((objmappost.get(key).postcomment)!=''...
Natavar Ghodasara's user avatar

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