• jeremy_r
  • NEWBIE
  • 0 Points
  • Member since 2006

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 4
    Questions
  • 7
    Replies
I need to delete a trigger from production.  Using the Eclipse plugin, the trigger is not listed as being available to delete.  Any ideas why this is?

Message Edited by jeremy_r on 09-07-2007 06:30 PM

The examples for unit testing seem to be mixing the unit tests in with the domain classes.  I don't really like this, as I like to keep test classes separate from the domain classes being tested.  The problem seems to be that if you sepratate your test methods into test classes, Apex expects your test classes to be covered, which turns into an infinite loop. 

Can anyone share what they feel may be a clean and scalable way to do testing with Apex code?

thanks

Jeremy
The Eclipse plugin creates folders called "Apex Triggers" and "Apex Classes".  However, the ant task requires them to be called "triggers" and "classes".  I created these folders and moved my triggers and classes to them, but the plugin can't deal with this apparently.  What's the best solution for this?

thanks

Jeremy
Is it possible to use fieldsToNull with Perl?  I've only had success with using a sing

$elem->{fieldsToNull} = "BillingCity";

works.. but this

$elem->{fieldsToNull} = ["BillingCity", "BillingState"];

doesn't.  Is it possible to use multiple fields?

thanks

Jeremy
I need to delete a trigger from production.  Using the Eclipse plugin, the trigger is not listed as being available to delete.  Any ideas why this is?

Message Edited by jeremy_r on 09-07-2007 06:30 PM

I just had a weird problem when creating a new trigger on a custom object in my testing sandbox. I fired up Eclipse and opened my SF project, and all was well. I had added a couple of custom fields to my Contact object, but the schema was updated to reflect that. I had no error messages at that point.

Then I created a new trigger on the custom Membership__c object, setting it to fire After Insert, After Update, After Delete, After Undelete. The purpose of the trigger is to update the custom fields in the Contact object, making no changes to the child (lookup) Membership object.

But then the toolkit gave me an error, preventing me from saving the new trigger to the sandbox: "Conflict found while saving trigContactMembershipInfo.tgr. Remote instance has been updated since last save or sync. Use the Synchronize Perspective to resolve the conflict." I checked in SF, and the new trigger didn't yet exist on the Membership object.

So I tried explicitly sync'g, but the error wouldn't go away. When I deleted the new trigger, everything sync'd fine.

I have admin rights in SF and can author Apex code, so that's not the problem.

The only thing that finally worked was to create it using the toolkit wizard as a Before Insert trigger, then manually change the signature for the events I needed. Then I could save the trigger, no problem.

Any thoughts about why this is happening?

Thanks,
Don
The examples for unit testing seem to be mixing the unit tests in with the domain classes.  I don't really like this, as I like to keep test classes separate from the domain classes being tested.  The problem seems to be that if you sepratate your test methods into test classes, Apex expects your test classes to be covered, which turns into an infinite loop. 

Can anyone share what they feel may be a clean and scalable way to do testing with Apex code?

thanks

Jeremy
The Eclipse plugin creates folders called "Apex Triggers" and "Apex Classes".  However, the ant task requires them to be called "triggers" and "classes".  I created these folders and moved my triggers and classes to them, but the plugin can't deal with this apparently.  What's the best solution for this?

thanks

Jeremy