• JakobS
  • NEWBIE
  • 0 Points
  • Member since 2015

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

We're doing a custom Lead Convert through Apex code.  We use setConvertedStatus = 'Qualified' when we convert the Lead.  This works fine.  The thing is, when we query for the Converted Lead in execute anonymous with:

 

Lead l = [Select Status, isConverted from Lead where Id = :convertedId];

 

isConverted is true, but the Status does not change to Qualified, despite this being a valid option in the picklist.  Instead, it remains as "Open" which is a non-converted Status.

 

I thought Lead.Status changes to reflect LeadConvert.setConvertedStatus ?

Hi all,

 

I have to change a case owner in a before trigger. The trigger works fine when i use an Administrator profile and the case owner is chnaged to that of a queue, but when i try changing the owner when using a user who's not an admin, i get an error saying that i don't have enough priviledges to perform the action.

 

 

I've put debug logs throughout the code to figure out the error,

The owner id actually is assigned the Queue Id, i think it's during the save operaion that i've missed something or there's an error.

 

can someone please point me in the right direrction and help me figurre out the error?

  • October 10, 2013
  • Like
  • 1

We're doing a custom Lead Convert through Apex code.  We use setConvertedStatus = 'Qualified' when we convert the Lead.  This works fine.  The thing is, when we query for the Converted Lead in execute anonymous with:

 

Lead l = [Select Status, isConverted from Lead where Id = :convertedId];

 

isConverted is true, but the Status does not change to Qualified, despite this being a valid option in the picklist.  Instead, it remains as "Open" which is a non-converted Status.

 

I thought Lead.Status changes to reflect LeadConvert.setConvertedStatus ?