You need to sign in to do that
Don't have an account?
SATHISH REDDY.
OpportunityLineItemSchedules group by Date in SOQL
Hi all,
I have a list of products with associated schedules where each schedule has different Revenue and ScheduleDate values. I'm trying to get the get the aggregate of Revenue by DATE across the OpportunityLineItems. However, i'm not sure how to achieve this as i couldn't find any date functions specific to date while DAY_ONLY() will only work for datetime fields. Please share your thoughts & recommendations.
Thanks!
I have a list of products with associated schedules where each schedule has different Revenue and ScheduleDate values. I'm trying to get the get the aggregate of Revenue by DATE across the OpportunityLineItems. However, i'm not sure how to achieve this as i couldn't find any date functions specific to date while DAY_ONLY() will only work for datetime fields. Please share your thoughts & recommendations.
Thanks!
Can you provide some schema, field level details for more clarity?
I have an opportunity which has - lets say 6 products (prod count varies by oppty) with associated schedules. I'm trying to insert a new product(Name - AGGREGATE PRODUCT), whose schedules must show the aggregate of all 6 product's schedules by "ScheduleDate".
I dont want to FOR loop over all the schedules of those 6 products & create a map with Map<Scheduledate, Sumof(revenue)> which would consume more cputime causing exception. Thought if there is any aggregateResult that can be used to get the sumof Revenue by Scheduledate.
Let me know if that makes sense.
Thanks!
Youi can try something like this