• AASTHA JAIN 21
  • NEWBIE
  • 0 Points
  • Member since 2019

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 2
    Replies
Hi Team,

As part of Bulk Apex Triggers, I have returned trigger on Opportunity to create a Task against that Opportunity when Stage is "Closed Won".

When I have tested by creating Opportunity with Closed Won, it creates Task under that properly. However when I am submit this challenge for review it shows below

Challenge Not yet complete... here's what's wrong: 
There was an unexpected error in your org which is preventing this assessment check from completing: System.DmlException: Insert failed. First exception on row 0; first error: CANNOT_INSERT_UPDATE_ACTIVATE_ENTITY, ClosedOpportunityTrigger: execution of AfterInsert caused by: System.DmlException: Insert failed. First exception on row 0 with id 00T6F00004GNWjZUAX; first error: INVALID_FIELD_FOR_INSERT_UPDATE, cannot specify Id in an insert call: [Id] Trigger.ClosedOpportunityTrigger: line 10, column 1: []

Can someone please let me know what exactly the issue here.

Many thanks in advance.

Regards,
Sridhar M
  • May 12, 2018
  • Like
  • 0

Does anyone know if http error  401 unauthorized is returned in Chapper API only if OAuth token if NOT set? Or is it also if sessionId not valid?

 

The reason I ask is I was getting Invaild session id error if  access_token was but when using C# to upload a file with Authorization header set to "OAuth " + token., I am getting this Http 401.  I just want to make sure is only for http level error of missing header and not invalid session id..  

 

 

 

  • January 05, 2012
  • Like
  • 0