• Kimberly Dy 16
  • 0 Points
  • Member since 2016

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
  • 0

I'm trying to use a trigger to update a custom date/time field from a date field in the same object. Here's a simple trigger I wrote since I don't know much about triggers. When I tested this, I noticed that the trigger did update the custom date/time field but it updated the wrong day. The original date field is 10/16/16 and the trigger updated the custom date/time field to 10/5/16. Can anyone help me with the trigger I wrote and see what I missed? Also, is it possible to update the field Closed_Date_Time__c from the field CloseDate and Close_Date_Time__c (picklist field)? 

trigger UpdateCloseDateTIme on Opportunity (before update)
{for (Opportunity opportunity: Trigger.new){
Opportunity.Close_Date_Time__c = Opportunity.CloseDate;}

Thank you! 
I have a formula in the workflow that updates date and time (picklist field) into a date/time value. However, I am receiving the erorr "Computed an invalid date, such as February 29th on a non-leap year. Please contact your administrator; formula fields can cause such errors." Does anyone know how I can incorporate the leap year on my current formula? 

DATETIMEVALUE(TEXT( AP_Meeting_Date__c ) + "" + 
TEXT( VALUE( LEFT( TEXT(Meeting_Start__c),2)) + 7) + 
MID(TEXT(Meeting_Start__c),3,3) + ":00")

Thank you in advance. 

Is it possible to send automated email notifications using workflow or process builder on a specific time zone base on the customer's location?


I'm not very familiar what custom data types are. But does anyone know how I can look for a custom data type? 

Thank you.