function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Mack DsozaMack Dsoza 

Custom Object

goalProfileList = new Goal_Profile__c[endYear - startYear];

 

Here Goal_Profile__c is my custom object but here what is happening...

Can we pass the paramenter in Goal_Profile__c custom object....

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

No, its two integers subtracted from each other.  I'd imagine its creating an entry for every year between start and end.

All Answers

bob_buzzardbob_buzzard

This is instantiating a list of Goal_Profile__c objects that contains (endYear - startYear) elements.  The square brackets denote a list rather than passing parameters when instantiating an sobject.

 

 

 

 

 

 

Mack DsozaMack Dsoza

Is it range of values ?

like [A-Z]...

 

So what it the benefits of doing this thing ?

bob_buzzardbob_buzzard

No, its two integers subtracted from each other.  I'd imagine its creating an entry for every year between start and end.

This was selected as the best answer
Mack DsozaMack Dsoza

Thank you so much Bob...