Salesforce CollaborationGroup sObject in Apex Unit Tests

The below Test Class Code will occur [System.DmlException: Insert failed. First exception on row 0; first error: DUPLICATE_VALUE] error if a same CollaborationGroup was existed,even Test Class dose not have the @IsTest(SeeAllData=true) annotation. As the document of Salesforce CollaborationGroup API [SOAP API Developer’s Guide],the Name of CollaborationGroup must be unique across public and private groups. […]

read more

Salesforce reRender dose not work with rendered attribute

Salesforce reRender will not work, if we’re going to hide reRender target with rendered attribute of itself, as the following sample code. In my opinion, reRender will reset the target DOM Node but not replace it after AJAX request completed,that means we can reset it’s childNodes even it’s html attributes, but cannot remove it.So there […]

read more

Salesforce RemoteAction and webService

In Salesforce,we can make asynchronous requests from Visualforce Page,via RemoteAction or webService. I will share you the usage of RemoteAction and webService In this post. RemoteAction Using RemoteAction(JavaScript Remoting) allows us to call methods in Apex controllers and get a callback with return data from JavaScript. The @RemoteAction methods in Apex must be static and […]

read more

The usage of apex:param in Visualforce Page

<apex:param> tag is used to pass values from JavaScript to an Apex controller,it can only be used with the folloing parent tags.   • <apex:actionFunction>   • <apex:actionSupport>   • <apex:commandLink>   • <apex:outputLink>   • <apex:outputText>   • <flow:interview> Here are some small examples of how you can pass a value via apex:param tag in Salesforce. Use <apex:param> in <apex:actionFunction> […]

read more