The Welkin Suite Forum

[Implemented] Schema autocomplete



Schema autocomplete

  • Please log in to reply

#1

jake

    Posted 20 Jan 2017 and edited 20 Jan 2018

    The SalesForce schema basically ends up as data classes in apex. It would be nice for autocompletion on schema elements. Basically when I type "Account." I end up seeing all the account fields and methods.


    4 replies to this topic

    #2

    kate.dulko

      Posted 20 Jan 2017

      Hi Jake,


      Thank you for contacting us with this issue.

      The completion of schema elements, in particular for fields, is already implemented in Apex files. Please let me know if this doesn't work for you. The reason for the absent completion suggestions can be that some objects are not downloaded to your TWS project.

      Further enhancing of the Code Completion for Schema elements will be done in a frame of current improving the Code Assitance functionality. Our developers are working on this.


      If some other necessary suggestions are absent in the Code Completion list, please write us about this. We will investigate these cases and will work on this.


      Thank you,

      Kate




      Kate Dulko
      Customer Relations

      The Welkin Suite

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

       

        


      #3

      jake

        Posted 30 Jan 2017

        Hmm. I subscribed to the objects I am trying to use and I still don't see them in autocompletion. In the below code sample, the Tracked_Action__c and Enrollment__c objects have been subscribed. I would expect to see the properties of the newTrackedAction object when I type it and hit a . after it.
        trigger TrackedAction on Tracked_Action__c(before insert) {
        
        	for (Tracked_Action__c newTrackedAction : System.Trigger.new) {
        
        		//validate if there is a valid enrollment for contact
        		List enrollments = [select Id, Effective_Date__c, End_Date__c
        		                                   from Enrollment__c
        		                                   where
        		(
        		(Effective_Date__c <= :newTrackedAction.Date__c AND End_Date__c >= :newTrackedAction.Date__c)  OR
        		(Effective_Date__c <= :newTrackedAction.Date__c AND End_Date__c = null) 
        		)
                               and Enrollee__c = :newTrackedAction.Contact__c];
        
        		if (enrollments.isEmpty())
        		{
        			newTrackedAction.Date__c.addError('A valid enrollment cannot be found for the contact and the date specified.');
        		}
        		else
        		{
        			if newTrackedAction.Type__c  
        		}
        
        	}
        
        }


        #4

        jake

          Posted 30 Jan 2017

          It looks like the problem is in triggers.


          #5

          kate.dulko

            Posted 31 Jan 2017

            Hi Jake,
            Thank you for providing us with the additional details about this feature.
            Right now, the Code Completion functionality is temporarily unavailable for triggers and anonymous apex. Resolving this issue is, of course, present in our nearest plans as a part of our focus on Code Completion functionality for now.
            While we are working on bringing this functionality back to The Welkin Suite, I can propose you to use Salesforce's well-known Trigger Handler pattern (or any of it's variations) to separate logic from triggers into handler classes - this will allow you to enjoy the Code Completion, as well as this approach, should provide you better flexibility in Salesforce development. You can find more details about this in the next articles: Trigger Frameworks and Apex Trigger Best Practices and Lightweight Apex Trigger Framework
            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