An org has a requirement that an Account must always have one and only one Contact listed as Primary. So selecting one Contact will de-select any others. The client wants a checkbox on the Contact called 'Is Primary' to control this feature.
The client also wants to ensure that the last name of every Contact is stored entirely in uppercase characters.
What is the optimal way to implement these requirements?
If the "PageReference.setRedirect" Apex function is set to False, what type of request is made?
There are user complaints about slow render times of a custom data table within a Visualforce page that loads thousands of Account records at once. What can a developer do to help alleviate such issues?
A custom field Exec_Count_c of type Number is created on an Account object. An account record with value of "1" for a: Exec_Count_c is saved. A workflow field update is defined on the Exec_Count_c field, to increment its value every time an account record is created or updated. The following trigger is defined on the account:
trigger ExecOrderTrigger on Account (before insert, before update, after insert, after update){ for (Account accountInstance: Trigger.New){ if (Trigger
. isBefore){ accountInstance Exec_Count_c += 1; } System. debug
(accountInstance.Exec_Count_c); } }
An org has 2 requirement that addresses on Contacts and Accounts should be normalized to a company standard by Apex code any time that they are saved.
What is the optimal way to implement this?