About this question
My question is about challenges when Opportunity is created specific fields must be populated. How can I count the fields which are not null from specific fields?
integer counter;integer oppValue;
for (Opportunity : Trigger.new) {
if (myOpp.Amount != null) {
oppValue= 1;}
else if {oppValue= 0;}
// Same loop repeats for several fields assigning value to oppValue.
counter = oppValue ++;
System.debug(counter);