1

I have a custom object that I would like to update based on several other custom object variables. Can someone help me get started on this? I want ONE FIELD (booked_revenue_by_Quarter IE: Q1-2014=$XXXXX) to have a Currency field with ALL ammounts of additional purchases summed up.

EXAMPLE: BOOKED_REVENUE_Quarter_C Field needs to be updated when

  1. Add'l purchase of A_object_c (checkbox) is marked OR
  2. Add'l purchase of B_object_c (checkbox) is marked OR
  3. Add'l Purchase of C_object_c (checkbox) is marked.

IN addition to

  1. Add'l purchase date_c of D_object_c (date field) is either Q1, Q2, Q3, Q4 OR
  2. Add'l purchase date_c of E_object_c (date field) is either Q1, Q2, Q3, Q4 OR
  3. Add'l purchase date_c of F_object_c (date field) is either Q1, Q2, Q3, Q4

ON TOP OF

  1. Add'l purchase ammount_c of G_object_c (date field) is $XXXXXX OR
  2. Add'l purchase ammount_c of H_object_c (date field) is $XXXXXX OR
  3. Add'l purchase ammount_c of I_object_c (date field) is $XXXXXX
  • 1
    Are there relations between these objects and records ? This looks like a combination of triggers, but that may depend on your overall use case and datamodel. As this is quite a broad question, trying to specify it to the generic essential question would improve the likelyhood of a solution being answered. – Samuel De Rycke Jul 8 '14 at 19:29
1

Is this for a trigger of a field update? I'm going to assume field update, but the same logic would apply for trigger, just with different syntax. For the Q1-Q4 part, it seems like you're trying to say if the date is this year? How does this look?

AND(
    OR(
        A_object_c,
        B_object_c,
        C_object_c
    ),
    OR
    (
        YEAR(D_object_c) == YEAR( TODAY() ),
        YEAR(E_object_c) == YEAR( TODAY() ),
        YEAR(F_object_c) == YEAR( TODAY() )
    )
)
  • I've updated my original post to help with the specifics. – B-Roge Jul 8 '14 at 20:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.