• GaryG
  • NEWBIE
  • 0 Points
  • Member since 2014

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

I'm trying to find out if I can use a Trigger to prevent the conversion fo a lead (upon certain conditions that I won't detail here).

My intuition was to use a Before trigger and check the field Lead.IsConverted.
If True, I run my validation and return an error when they fail.
If False I just let the operation complete.

The problem is I'm not sure that the field IsConverted will already be set to true when I use a Before Trigger.

Is there a way to check?
  • May 14, 2014
  • Like
  • 0
Hi all,

I'm in the process of evaluating Apex for the implementation fo some workflow.
I'm fairly new to Salesforce in general and I could'nt find a clear answer to that question yet.

Let's say you have a Before Trigger set to the creation fo some record.
Is it possible in your event handling to prevent the record from being created and send back an error to the user?

I understand it would be possible to do on the UI level, when someone clicks on a button but I would prefer to stay away from UI level customization as much as possible. And the way I understand it, if you place a before trigger on the creation of a record, it is triggered regardless of the way the record gets created (UI, API, ...). That's waht I would need, as opposed to a trigger on a specific UI button.
  • May 09, 2014
  • Like
  • 0
Hi all,

I'm trying to find out if I can use a Trigger to prevent the conversion fo a lead (upon certain conditions that I won't detail here).

My intuition was to use a Before trigger and check the field Lead.IsConverted.
If True, I run my validation and return an error when they fail.
If False I just let the operation complete.

The problem is I'm not sure that the field IsConverted will already be set to true when I use a Before Trigger.

Is there a way to check?
  • May 14, 2014
  • Like
  • 0