You need to sign in to do that
Don't have an account?
Ramprasath Subramaniam 17
Copy field value from different custom object, based on the close date
HI,
I am new to Salesforce Devlopment and would appricate your help.
I have two custom objects,
1. Commission line
2. Commission rate
commission rate object captures,
cateogory, commission rate, startdate, enddate.
I would like to populate "Rate" field in "commission line" object, based on the "category" field value in "Commission line" object.
for e.g. when Commission_line.Category = hardware AND Commission_line.CloseDate field = 04/15/21
Comission rate object
based on "Commission_line.Category" and "Commission_line.closedate", I want to poulate the Commission_line.rate from the Rate value form the Commmission rate object.
in this case, rate = 2.5. category falls within the date range
I am new to Salesforce Devlopment and would appricate your help.
I have two custom objects,
1. Commission line
2. Commission rate
commission rate object captures,
cateogory, commission rate, startdate, enddate.
I would like to populate "Rate" field in "commission line" object, based on the "category" field value in "Commission line" object.
for e.g. when Commission_line.Category = hardware AND Commission_line.CloseDate field = 04/15/21
Comission rate object
Category | Rates | Start period | End period |
hardware | 2.5 | 1/1/2021 | 12/31/2021 |
Software | 4 | 1/1/2021 | 12/31/2021 |
SMA | 3 | 1/1/2021 | 12/31/2021 |
hardware | 2.5 | 1/1/2022 | 12/31/2022 |
based on "Commission_line.Category" and "Commission_line.closedate", I want to poulate the Commission_line.rate from the Rate value form the Commmission rate object.
in this case, rate = 2.5. category falls within the date range
Try Formula field, That would definetly solves your issue.
Thanks,
Naresh
would you be able to guide me on how this formual would be written
Hi,
I can writte trigger like this.
trigger
here is the case Commission_line__c is a child and Commission_rate__c is a parent.
If it helps you please mark it as The Best Answer.
Thank You
thank you for sharing the code. really appreciate the help.
can this also be solutioned using FLOW in salesforce?