• CodeIT
  • NEWBIE
  • 5 Points
  • Member since 2016

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 6
    Replies
Hi experts,

I have a custom object Submittals and an approval process built for it.

The use case is:
A record was submitted and is pending approval
If a field ("status") on the Submittal is changed to "closed" all pending submittals should be automatically rejected.

How to accomplish this?

Thank you!
  • February 19, 2016
  • Like
  • 0
I'm getting the following error when I try to set an opportunity to closed won:

Error:Apex trigger Create_followup caused an unexpected exception, contact your administrator: Create_followup: execution of BeforeUpdate caused by: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, editSchedule: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0 with id 00oU0000002ulNkIAI; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id] Trigger.editSchedule: line 144, column 1: []: Trigger.Create_followup: line 88, column 1

The two triggers mentioned in the error are both triggers I wrote. Can anyone tell me what this type of error might be caused by?

Thanks
I have a CSV file of leads I would like to import into Salesforce, how can I de-dupe the list against my existing leads and client contacts in Salesforce to ensure I don't have duplicates? I don't really want to use an app if I can avoid it and I'm not sure how to use the Trigger facility.


 

Hi All,

 

Typically I write my apex code in eclipse. When I try to format the code using ctrl+shift+f, it is not working. Is there any way to format apex code in eclipse.

 

Please let me know. An help in this regard really appreciated.

 

Regards,

Naren

  • January 24, 2012
  • Like
  • 0

Is it possible to force the Apex editor to use the Java source code format specified in preferences?

 

  • October 27, 2009
  • Like
  • 0