The Welkin Suite Forum

Import AnonymousApex from another solution



Import AnonymousApex from another solution

  • Please log in to reply

#1
mac version welkinsuite

bcruz

    Posted 24 Apr 2017

    I have several saved AnonymousApex classes that I use to script certain things.  I have several Solutions created and wanted to "import" the anonymous apex that I created from one solution to another.  I thought that if I copied the source files from the solution1/AnonymousApex folder to the solution2/AnonymousApex folder that it would be the same as an import.  This doesn't work.

    How do I "import" anonymous apex without having to copy and paste each file?



    1 replies to this topic

    #2

    kate.dulko

      Posted 24 Apr 2017

      Hi Robert,


      Thank you for your question.


      An ability to 'import' existing custom Anonymous Apex files (as well SOQL queries) to your TWS project is present in our development backlog, however, this option isn't implemented in the IDE currently.


      As a workaround, you can add the 'references' to your Anonymous Apex files in an appropriate *.sfproj file.

      For example, if you have the project, which is located by the path D:\Project1 and you want to include Anonymous Apex which is located in another project D:\Project2 under the 'AnonymousApex' folder with the name 'MyUniversalCode.anonymous' - you should modify the .sfproj file in the Project1 and add the following lines there:

                <AnonymousApex Include="AnonymousApex\MyUniversalCode.anonymous">
                     <SubType>AnonymousApex</SubType>
                     <PhysicalRelativePath>..\Project2\AnonymousApex\MyUniversalCode.anonymous</PhysicalRelativePath>
             </AnonymousApex>


      Please let us know if this workaround would cover your needs.


      Thank you,

      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