You need to sign in to do that
Don't have an account?
Cris9931
trigger ideas for this scenario
Hi, I want to create a trigger for the following scenario... I have 4 fields:
0. Reported Start Date(date datatype)
1. Reported Start Time(time datatype)
3. Reported End Date(Date datatype)
4. Reported End Time(time datatype)
Only the following interval of time is relevant, from 22:00(10PM) - 00:00(12 AM, next day). This interval is important because I want to display the value from formula field based on this interval of time.
Example: I have from 10:00 PM - 01:00 AM, display show 120 minutes, because we only count minutes in this interval of time.
Example 2: I have from 08:00 PM - 10:00 PM, display nothing(blank), because is not included in this interval of time.
Example 3: I have from 11:00 PM - 00:00 AM, display 60 minutes.
The minutes I want to be displayed in a field called Calculated_Time__c... any ideas how can I do this?
0. Reported Start Date(date datatype)
1. Reported Start Time(time datatype)
3. Reported End Date(Date datatype)
4. Reported End Time(time datatype)
Only the following interval of time is relevant, from 22:00(10PM) - 00:00(12 AM, next day). This interval is important because I want to display the value from formula field based on this interval of time.
Example: I have from 10:00 PM - 01:00 AM, display show 120 minutes, because we only count minutes in this interval of time.
Example 2: I have from 08:00 PM - 10:00 PM, display nothing(blank), because is not included in this interval of time.
Example 3: I have from 11:00 PM - 00:00 AM, display 60 minutes.
The minutes I want to be displayed in a field called Calculated_Time__c... any ideas how can I do this?
You can try this code:-
In case you find any other issue please mention.
If you find your Solution then mark this as the best answer.
All Answers
You can take reference given this below code:- In case you find any other issue please mention.
If you find your Solution then mark this as the best answer.
Thanks and Regards
Suraj Tripathi.
Hi Suraj,
Working fine expect I have this one minute added additionally... why is that?
You can try this code:-
In case you find any other issue please mention.
If you find your Solution then mark this as the best answer.
Hi, I found another solution with a formula field, which is better because of less CPU consumage, also it's real time.