If date is between Date A and Date B, week # =1
If date is between Date C and Date D, week # = 2
etc.
The dates and week #'s are as per an internal numbering system we use.
I currently do this just fine with a formula field, however the character limit of 5000 restricts how far into the future I can apply the calculation, and this is becoming a problem.
Ideally, I'd like to set up a custom object that maintains all of the dates and associated week numbers, without limit, and when the date on the opportunity product is entered it automatically refers to the custom object and updates the opp product week # field with the week # on the associated record in the custom object (almost as though it's doing a VLOOKUP against the date and bringing back the week #).
Does anybody have any advice on this or experience with a similar scenario?
Thanks.
3 Antworten
Hello Martin, formula fields can access parent objects even for multiple layers so a formula field on a custom object that is a child to opportunities CAN access information from the opportunity but NOT the opportunity products as the custom object and opportunity products will be siblings.
My suggestion is to use workflow rule field updates instead of formulas. The formula field update can take around 8000 characters rather than 5000. For existing records you would have to do a "dummy API update" as in doing an update using the data loader using a file that only contains the IDs of the records so you can trigger the rule on them.
Please mark this answer as the best answer if it resolved your issue. Thanks!