function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
sihmeieossihmeieos 

Unable to Delete Apex Trigger, Class from ProductionOrganization

Hi.

 

I create Apex Trigger and Class on Force.com IDE(Eclipse 3.5.2) and my project set to Production Organization.

Now, I want to delete from Apex Trigger and Class I created in past time, but I can't.

 

[can't delete message]

"Remote delete failed with the following message. Delete will be aborted.   <Apex Class Name>: null package.xml:null"

 

[Error Log]

■WARN

"(ProjectService.java:handleRetrieveResult:2068) - Nothing to save to project - retrieve result is empty"

■ERROR

"

(DeleteRefactorController.java:performRemoteDelete:274) - Remote delete failed with the following message.  Delete will be aborted.
  createWork: null

 

(DeleteRefactorController.java:performRemoteDelete:274) - Remote delete failed with the following message.  Delete will be aborted.  <Apex Class Name>k: null"

 

What's that phenomenon?

Why that phenomenon come up?

 

Please tell me that reason if you know.

And please tell me the solution if you will.

 

Thanks.

 

 

SidzSidz

We cannot delete anything from production directly we need to make changes in test and  deploy the complete instance from test itself.

 

We cannot see any edit options in the UI of  the production also for triggers,classes or pages

sihmeieossihmeieos

Hi,Sidz.

Thanks for your help.

 

So if we can't delete Apex Trigger and Class, I want to change trigger , class name.

But I can't change name, too.

 

When I want to change name and change that code, Do I use what method on Force.com IDE?

SidzSidz

i think you can sync your current prod instance to test instance, make changes and then sync to prod again.

sihmeieossihmeieos

Hi, Sidz.

 

I should change ProjectProperty (Organization Setting), production org to test org,

and I change the name, code on test org.

next, I will deploy to production org?

 

I’ll give it a try.

I'll report a result.

 

Thanks.

SidzSidz

hi,

if you can't delete the trigger which is already in prod just remove all the content from trigger with the same name in your test and then create your own trigger and deploy to prod.

 

 

 

EIE50EIE50

Hi,

 

You can delete the trigger and class from prodcution using eclipse ide. Just create a new project in eclipse ide with your production credentials, choose the required classes, triggers via add or remove metadata components. Then, after you are done with creating a project, in the ide drill down to the triggers and the trigger that you want to delete, right click on the trigger that you want to delete and choose delete option. It would prompt you ' are you sure you want to delete file blahblah.trigger' press ok and it would again prompt you weather to delete the file locally or on the server as well. choose the one you want and it would take solid amount of time to get deleted (time is around 10-25mins) for each trigger and class individually.

 

Thanks.

sihmeieossihmeieos

Hi Sidz.

Thanks for you reply.

 

I tryed, but I can't delete.

 

<<method:1>>

1.copy production to sandbox

2.make new project on eclipse

3.delete class

4.deploy to production → can't delete

 

<<method:2>>

1. same

2. same

3. update class

4. deploy to production → SUCCESS

 

when can't delete, display the following message.

"Method Name Not Available"

"line 3, column 5: Mtethod does not exist or incorrect signature: [ClassName].[MethodName]([Argument])"

 

Do you have Idea?

I have no hope...

sihmeieossihmeieos

Hi EIE50.

and thanks for your help.

 

I tryed to delete to use the method you advised.

But I can't delete, display the following message on eclipse.

 

"Remote delete failed with the following message. Delete will be aborted. [ClassName]:null  package.xml:null"

 

and display the following message on eclipse's error log.

 

"WARN [2010-06-17 16:26:13,203] (ProjectService.java:handleRetrieveResult:2068) - Nothing to save to project - retrieve result is empty"

"ERROR [2010-06-17 16:26:13,203] (DeleteRefactorController.java:performRemoteDelete:274) - Remote delete failed with the following message.  Delete will be aborted.

  createWork: null

  package.xml: null"

Do you have the solvent??
And Do you know  why that phenomnon come up?
WARN [2010-06-17 16:26:13,203] (ProjectService.java:handleRetrieveResult:2068) - Nothing to save to project - retrieve result is emptWARN [2010-06-17 16:26:13,203] (ProjectService.java:handleRetrieveResult:2068) - Nothing to save to project - retrieve result is empty
EIE50EIE50

Hi,

 

The work around would be to De activate the trigger that you want to delete, so that it doesnt trigger any class. In this way even if you cant delete, the trigger and its respective class would remain useless in your prodcution. I can understand that the apex class characters would count towars the limit but if you are not able to delete then i would suggest you to just deactivate the trigger so that it doenst work. I am sorry i am just not sure why you are not able to delete the trigger/ class in your production even though you have the right permissions.

 

Thanks.

 

 

Fra08Fra08

Hi, thank you for your suggestion,  we did the steps correctly but then.,...we didn't pass the test!

 

This is what we did:

 

1- Create new project

2- upload in the new project all classes

3- then click with the right button on the class we want to delete and click on DELETE.

4- Deploy the new project, and then we get the class to delete in RED color, we continue the process and...

 

Finally we get the message that we miss 1% to pass the test...

but how is this possible? we didn't modify the other classes and they have been correctly uploaded some months ago!

 

What can we do to pass the test? we just want to delete an wrong class..

 

help!