You need to sign in to do that
Don't have an account?
m_roark
Unable to deactivate or delete classes and triggers in production SalesForce instance?
I was working on uploading some APEX code in our production environment, using the APEX Deployment Tool add-on for Apache Ant. I downloaded the most recent version of this tool this morning, as I understand there were some issues with it over the last day or so.
Before I uploaded the code, I had wanted to delete a class created the other day, which had no triggers depending upon it. However, I received the following error message when I attempted to do so.
BUILD FAILED
C:\Documents and Settings\RoarkM\Desktop\Apache Ant Files\build.xml:16: Failed:
Failed to delete class compileAndTest: Cannot complete this operation. Cannot delete classes/triggers in production. Use compileAndTest verb to delete. : null
I have included the 'build.xml' file for this build below for anyone who would like to review it.
After realizing that I could not delete this class, I looked to find if there was a way of deactivating APEX triggers or classes in our production environment, as might be necessary if code were to become depreciated. I could find no documented way through the UI or through the APEX Deployment Tools add-on to do this.
Are there plans to add this functionality, or an undocumented way to deactivate classes? Has anyone else encountered issues deleting APEX code in production? Did I misconfigure one of the elements below?
Any assistance would be greatly appreciated.
Before I uploaded the code, I had wanted to delete a class created the other day, which had no triggers depending upon it. However, I received the following error message when I attempted to do so.
BUILD FAILED
C:\Documents and Settings\RoarkM\Desktop\Apache Ant Files\build.xml:16: Failed:
Failed to delete class compileAndTest: Cannot complete this operation. Cannot delete classes/triggers in production. Use compileAndTest verb to delete. : null
I have included the 'build.xml' file for this build below for anyone who would like to review it.
After realizing that I could not delete this class, I looked to find if there was a way of deactivating APEX triggers or classes in our production environment, as might be necessary if code were to become depreciated. I could find no documented way through the UI or through the APEX Deployment Tools add-on to do this.
Are there plans to add this functionality, or an undocumented way to deactivate classes? Has anyone else encountered issues deleting APEX code in production? Did I misconfigure one of the elements below?
Any assistance would be greatly appreciated.
<project
name="Sample usage of Salesforce Ant
tasks" basedir="."
xmlns:sf="antlib:com.salesforce">
<property file="build.properties"
/>
<property environment="env" />
- <sf:compileAndTest username="${sf.username}"
password="${sf.password}" server="${sf.serverurl}"
apiversion="10.0">
<deleteClass>compileAndTest</deleteClass>
<deleteTrigger>addTasksOnComplete</deleteTrigger>
<deleteTrigger>reassignChildItems</deleteTrigger>
</sf:compileAndTest>
</target>
</project>
Any ideas on how to deactivate classes or triggers without deleting them? Is this functionality on the roadmap to be added to the APEX Deployment tools?
Regards,
Any news on this? I realize priorities change but the post indicating that this was being looked at (the ability to deactivate classes) was in 2007 (about 6 years ago). Is there a new update? Can anyone recommend other tools or options since we still can't do this through the UI; or is the only option still IDE? Thank you!