• nothing
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 1
    Questions
  • 2
    Replies
Is it possible to get the day of the week ("Friday") from Date or DateTime?

Thanks in advance
Hi,
I am trying to write a code inside an APEX trigger to add new record in RecordType object(Default table provided by SalesForce) but this is giving me comple tile error as following

"DML operation is not allowed on RecordType"

Is there any way to insert a new row(entry) in RecordType table from trigger..
Thanks is advance
Forgive me for asking, as I can see that this topic has a couple of threads dedicated to it, but I'm new to Apex (as of last Friday) and none of these threads discuss this issue to my liking.  I have a rather simple problem.  I'd like to do an external SOAP query when someone adds a new contact to Salesforce to see if I can automatically fill in a bunch of the fields in that record.  I already have a web service that will return this information, but seeing as how I am unable to do this from a trigger (I get the 'Callout from triggers are not currently supported' exception), I believe the following is my only option (correct me if I'm wrong):
 
  1. Create a new Outbound Message from Workflow
  2. Generate the WSDL associated with the outbound message
  3. Create a new web service on my server to handle the outbound message from Salesforce
  4. This new web service must query Salesforce if there is any additional information that I need because the Outbound Message is limited to sending the fields on the table for which the event is defined.
  5. Once I have this additional information I can then perform the actual web query that I wanted to perform from Salesforce, only now the response will come to my application.
  6. Once I have the response I can update the record accordingly, either by defining an Apex web service or by generating a SOAP message as defined by the WSDL for my particular instance.
If this is correct, then I actually find this quite surprising.  Why is this limitation in place?  This seems like a simple task that has been needlessly complicated by an artificial limitation.  I can't even define an Apex web service to handle the Outbound Message?  Why should I be forced to deploy a service to make this possible?
 
Any help or advice you can provide would be appreciated.
 
Thanks!