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
ishesh somani 6ishesh somani 6 

Universal con needs a field on the account to track how many opportunities are closing within the next 30 days. What can be used?

Universal con needs a field on the account to track how many opportunities are closing within the next 30 days. What can be used?

A. Workflow rule
B. Roll-up summary field
C. Process builder
D. Apex code
Naveen DhanarajNaveen Dhanaraj
Apex Code
ishesh somani 6ishesh somani 6
can you please tell the reason why apex code? I am quite sure of roll up summary .
Naveen DhanarajNaveen Dhanaraj
Could you please try working on different options :)
YUVAPRAKASH THULASIMANIYUVAPRAKASH THULASIMANI

Here they have explained in brief: http://sfcertifications.blogspot.in/2017/02/roll-up-summary-field.html

They were claiming it to be Roll up summary field
 

Michael BrumleyMichael Brumley
That explanation is incorrect - a rollup will not work because "next 30 days" would require the use of the Today() function in the criteria, which (along with all other dynamic functions) is not allowed there. (Try entering it & see what happens.) Other possibilities: you can create a checkbox field on the Opportunity that compares CloseDate to Today() + 30, but it will not show up in the list of fields available for the rollup criteria. And, one other poster has created an elaborate workaround using a WR, but it has drawbacks and is clearly not the sort of thing SF would expect you to be aware of. Finally, keep in mind - there is pretty much guaranteed to be one question for which the answer is "AppExchange", and one for which it's "Apex". If you get to the end of the test and that hasn't happened, better go back & review...
SharmaVishalSharmaVishal
The filter on the roll-up summary field requires a fixed date. It won't accept a formula like Today()+30
Fu GaoFu Gao
Michael 's comment is right, I tried to add a roll-up summary field to Account object but the filter criteria value only accepts a definite date like 2020/6/8. What's more I also create a formula on Opportunity to show if close date is in 30 days, when I tried again to add roll-up summary field it failed, for the filter field refused a formula.