The Welkin Suite Forum

Use Welkin Suite to delete a production trigger?



Use Welkin Suite to delete a production trigger?

  • Please log in to reply

#1
mac version welkinsuite

muchavie

    Posted 04 Jan 2018 and edited 25 Jul 2018


    Salesforce makes deleting a trigger in a production environment hard.   This is the only task that I use Force.com IDE (Eclipse) for.

    The steps using Eclipse can be found at:

    https://help.salesforce.com/articleView?id=000003942&type=1

    I wonder has anyone tried following these steps using Welkin Suite instead of Eclipse?  I've got a trigger delete coming up in the next couple weeks and I'm not looking forward to dusting off Eclipse just to perform this task.

    Thanks in advance!

    Peter


    Here's a little more info.   See this stackexchange post:

    https://salesforce.stackexchange.com/questions/5776/deleting-triggers-classes-from-production


    Would opening Welkin Suite on a production org and updating and saving the xml file associated with the trigger as shown below work?


    <?xml version="1.0" encoding="UTF-8"?>
    <ApexClass xmlns="http://soap.sforce.com/2006/04/metadata">
        <apiVersion>23.0</apiVersion>
        <status>Deleted</status>
    </ApexClass>





    6 replies to this topic

    #2

    vlgubanovich

      Posted 04 Jan 2018

      Hi Peter,


      Thank you for getting to us with this question!

      Of course no need to disturb Eclipse... let it rest :)


      Steps to do the same are pretty similar, but it just took me less than 3 minutes doing this, so I believe it's easier than using Eclipse.

      Changing the -meta.xml file and trying to build it against the production won't help - Salesforce don't allow this change to be done in a such way, however there's another way:

      1. Get your sandbox (* - yup smile, details in small font below) project opened with the trigger present there

      2. Change the status to "Inactive" in the -meta.xml for your trigger

      3. Right-click on the project and select 'Deploy to organization', enter the credentials of your production org and choose only the trigger you want to deactivate and proceed with deployment

      Once the previous step is done - the trigger is inactive. If you need to delete it, you'll need 2 (okay, 3) more steps:

      4. Right-click on the project and select the 'Project metadata components', find your trigger, uncheck it and apply the changes

      5. Again navigate to the 'Deploy to organization', enter the credentials of the prod org and choose your trigger - the "Action" near it will state "Delete". Proceed with the deployment

      6. As your action in the 4th step removed the 'Subscribe' mark from your triggers in the project, please open once more the 'Project metadata components' and click the 'Subscribe' button near the 'Apex Triggers'


      Might look like "too much steps", but the process is pretty straightforward and works really fast.

      Regarding that * in the 1st step - tomorrow (Friday) we'll release a new version of TWS for Mac where you will be able to deploy to the same organization using the 'Deploy to organiation' features and, even, you won't need to enter your credentials. So with the (not yet released) Blaze R9 you'll be able to open/create a project directly for your prod environment and do everything even faster (while with the same number of steps).


      Hope this helps!


      Best regards,

      Vladimir


      Vladimir Gubanovich
      Head of Product
       
      The Welkin Suite
      skype id: vladimir.gubanovich
      e-mail: vladimir.gubanovich@welkinsuite.com


      #3

      muchavie

        Posted 04 Jan 2018 and edited 04 Jan 2018

        I will try this!  Thank you!



        #4

        Ganesha303

          Posted 04 May 2018

          Vladimir - 

          Do you have steps for also doing this with classes? I tried the process above but classes apparently cannot be changed to inactive and using "deleted" does not work. I would love to retire eclipse for this purpose.

          Thanks,


          Gabriel Chapman



          #5

          kate.dulko

            Posted 10 May 2018

            Hi Gabriel,


            Thank you for your question.


            We are aware that these steps don't work to make an apex class 'inactive', and currently we are looking for a way to provide you with an ability to do this directly from the IDE.

            I will let you know when we will implement an additional functionality for this or will find a possible workaround.


            If you have any other questions, please let us know. We will be happy to assist.


            Regards,

            Kate


            Kate Dulko
            Customer Relations

            The Welkin Suite

            twitter: @KateDulko
            skype id: d_katerina
            e-mail: kate.dulko@welkinsuite.com

             

              


            #6

            michaelforce

              Posted 12 Jul 2018

              Hi Katie (or anyone who can help) is there an update here?  I have some Apex classes I would like to delete and I really do not want to have to reinstall eclipse just for that.


              Cheers!



              #7

              kate.dulko

                Posted 25 Jul 2018

                Hi Michael,


                Thank you for your question.

                You can follow the steps which are described here and in this way you will be able to delete the necessary Apex Class.


                Hope this would help and there won't be a necessity to reinstall eclipse :)

                If you would have any additional questions, please let me know and I'll be happy to assist.


                Best Regards,

                Kate



                Kate Dulko
                Customer Relations

                The Welkin Suite

                twitter: @KateDulko
                skype id: d_katerina
                e-mail: kate.dulko@welkinsuite.com

                 

                  





                Boost Your Productivity. Get Started Today

                Try Free Trial