Monday, April 17, 2017

List of Annotations in Salesforce Apex

Usually Annotation means which will specifies the behavior or modifies the way how the particular class or method behaves in salesforce. Based on annotations the functionality or behavior and usage of particular class or method we can simply identify.

Each annotation will starts with '@' symbol and followed by name of the annotation
To declare a method/class with annotations it must be declared immediately before method/class

List of Available Annotations in Apex:


  • @isTest
  • @InvocableMethod
  • @InvocableVariable
  • @future
  • @AuraEnabled
  • @ReadOnly
  • @RemoteAction
  • @TestSetup
  • @TestVisible
  • @Deprecated

Apex REST annotations:

  • @RestResource(urlMapping='/yourUrl')
  • @HttpDelete
  • @HttpGet
  • @HttpPatch
  • @HttpPost
  • @HttpPut

No comments:

Post a Comment