• brountre
  • NEWBIE
  • 25 Points
  • Member since 2009

  • Chatter
    Feed
  • 1
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 3
    Replies

Can you copy the contents of a richtext field that contains a picture and append it to another richtext field?  

Can you copy the contents of a richtext field that contains a picture and append it to another richtext field?  

I have just started learning APEX but have old C , basic experience.

 

I am trying to use a date field and time field for my object to allow smoother input of scheduling appointments. I have converted the date to startdate string and time is already a string - I can combine both and was using Valueof method to create the datetime field but the format is invalid as datetime wants yyyy-mm-dd hh:mm:ss and my string is coming out mm/dd/yyyy hh:mm AM or PM.

 

I guess i can break everything down to day, month, year and then reconstruct but hoped there was a less cumbersome way.  Want the date / time input to input the way the default event page does it.

 

Any help for this APEX novice is appreciated

  • August 07, 2011
  • Like
  • 0

I have created a custom object called PTO. I have also created an approval process for it.  How can I create a  trigger so that it automically executed the approval process i have setup as soon as a new PTO record is created(inserted).  This would behave the same way as if I manually pressed the submit approval button.

 

trigger PTO_Trigger on PTO__c (after insert) 
{
for(PTO__c pto: [select id from pto__c])
{
Approval.ProcessSubmitRequest req1 = new Approval.ProcessSubmitRequest();
req1.setObjectId(pto.id);
}
}

 

 

 

Message Edited by bikla78 on 07-15-2009 11:49 PM