The Welkin Suite Forum

Snippet collection

Snippet collection

  • Please log in to reply



    Posted 23 Jul 2015

    With the introduction of the Snipper manager I thought it would be a good idea to make a forum thread where we can exchange snippets we made. Snippets are located in the following location:

    (If you followed the default install path, otherwise change as needed)

    C:\Program Files (x86)\The Welkin Suite\The Welkin Suite\Extensions\Application\Editor\CodeSnippets\Snippets

    Simply copy a snippet and change the contents of the file for it to work. If you download a snippet you can drag and drop it in the directory for it to be picked up by the Welkin Suite.

    Follow the excellent post from the Welkin Suite team to find out more:


    This snippet contains a foreach loop. Although the loop in Apex is called for, it behaves as a foreach loop as in c#. It generates a piece of code as followed:

    for (sObject obj : objs)

    Unfortunately we are not allowed to upload snippet or zipfiles. So copy the following code and paste it into a .snippet file.

    <?xml version="1.0" encoding="utf-8" ?>
    <CodeSnippets  xmlns="">
    	<CodeSnippet Format="1.0.0">
    			<Description>Code snippet for 'foreach' loop</Description>
    			<Author>Ron Planken</Author>
    					<ToolTip>The type of the objects being iterated over</ToolTip>
    					<ToolTip>Name of the variable that will contain the single item from the list</ToolTip>
    					<ToolTip>Name of the variable that contains the list of objects to iterate over</ToolTip>
    			<Code Language="Apex"><![CDATA[for ($objtype$ $obj$ : $list$)
    			$selected$ $end$

    1 replies to this topic



      Posted 03 Aug 2015

      Hi Ron!

      Thanks for sharing this :)

      This topic looks like a good idea for collecting useful snippets from our community - I'll add link to this post to the blog post if you don't mind.



      Vladimir Gubanovich
      Head of Product
      The Welkin Suite
      skype id: vladimir.gubanovich

      Boost Your Productivity. Get Started Today

      Try Free Trial