Using Promise for Apex Server-Side request in Lightning Component
- Jan
- 06
- Posted by Lin
- Posted in APEX, Lightnint Component, Salesforce
In Lightning Components, each communication with Apex Server-Side is handled as a Javascript async request, and the callback you set is called after the server-side action is completed. A server-side action can return any JSON object, such as sObject or a map of name-value pairs. The followoing sample code shows how a server-call works in […]
read moreBulk Approval Processing from List View in Salesforce
- May
- 13
- Posted by Lin
- Posted in APEX, Salesforce
I have shared “Approval Processing with Apex in Salesforce” in previous post, and in this post, I’ll continue to share the way of bulk approval processing from Salesforce list view. The outline we need to do is as below : ・Add a custom button for list view ・Set List View Layout ・Add a Apex Class […]
read moreApproval Processing with Apex in Salesforce
- May
- 13
- Posted by Lin
- Posted in APEX, Salesforce
An approval process is an automated process your organization can use to approve records in Salesforce. Usually we can request/approve an approval process through the standard approval process feature, but we can also do those things with Apex in some cases such as : request/approve from VF Page or from Custom Button. Here is Approval […]
read moreSalesforce ContentDocument sObject in Apex Unit Tests
- Sep
- 08
- Posted by Lin
- Posted in APEX, Salesforce, Unit Tests
ContentDocument object does not allow insert DML operation in Salesforce, but we can create it through the ContentVersion object, without ContentDocumentId, then a new version of ContentDocument will be created for us in SFDC, just like the sample code below :
read moreSalesforce CategoryNode sObject in Apex Unit Tests
- Sep
- 01
- Posted by Lin
- Posted in APEX, Salesforce, Unit Tests
In Salesforce,DML operation is not allowed on CategoryNode sObject,even in Unit Test. Although the 《Force.com Apex Code Developer’s Guide》 does not mention it clearly,that CategoryNode object can be accessed in Apex Tests, we have to prepare CategoryNode data first in Setup interface.by clicking Customize > Solution > Solution Categories. The following is the sample code […]
read moreA bug caused by Decimal without SetScale
- Jul
- 30
- Posted by Lin
- Posted in APEX, Salesforce
Let’s see the following Apex Script first. In fact the Apex Script will throw an AssertException. “System.AssertException: Assertion Failed: Expected: 0E-32%, Actual: 0%”. So we’d better round the Decimal before we convert it to String.Like the following Apex Script.
read moreDate format and DateTime format
- Apr
- 24
- Posted by Lin
- Posted in APEX, Salesforce, Visualforce
Date format in Apex 1.Use Date format method 2.Convert to String directly 3.Convert to DateTime DateTime format in Apex Date format in VF DateTime format in VF Date format in Formula DateTime format in Formula TZoffset is the difference between the user’s time zone and GMT。 When in Tokyo:TZoffset = “9/24” Reference : https://help.salesforce.com/help/pdfs/en/formula_date_time_tipsheet.pdf
read moreHow to access static resources from Apex, Visualforce and Custom Button
- Feb
- 26
- Posted by Lin
- Posted in APEX, Other, Salesforce, Visualforce
In Apex Normal file (with soql) Normal file (with PageReference.getContent) Zip file (with PageReference.getContent) ※Zip file can not be accessed by soql. In VF Normal file Zip file In Custom Button
read moreSFDC SObject Quick Panel – Quick access to Salesforce Standard Objects and Custom Objects
- Jan
- 20
- Posted by Lin
- Posted in APEX, Open Source, Other, Salesforce, Visualforce
As a SFDC Developer,how do you open [Custom Object Setting] page, from [Setup] > [Create] > [Objects] > [Object Name] ? In fact,utilizing “sObject Quick Panel”,it could be more fast only need 1-Click. Screenshots Source code Download from Github That is all, Enjoy it!
read moreA simple Salesforce Trigger framework
- Jan
- 12
- Posted by Lin
- Posted in APEX, Open Source, Salesforce
Well,this is another Salesforce Trigger framework but more simple. Usage AccountTriggerHandler.cls AccountTrigger.trigger In normal case. Stop and resume sObject Trigger in APEX code Stop and resume a TriggerHandler in APEX code SourceCode Download from Github That is all, Enjoy it!
read moreRecent Posts
- Salesforce DevTools Release Notes (version 3.10.0) – mass edit custom fields on lightning
- Salesforce DevTools Release Notes (version 3.9.0) – Object Fields, SOQL Query Editor
- Salesforce DevTools Release Notes (version 3.8.0)
- Salesforce DevTools JUST HIT 10,000 USERS! THANK YOU!
- Using Promise for Apex Server-Side request in Lightning Component
Top Posts
- Salesforce DevTools – Powerful Salesforce developer tools, loved by over 50K developers - 219.6K views
- Date format and DateTime format - 204K views
- Salesforce Mass Editor (Chrome Extension) – Mass create, mass update, mass clone, mass delete on any list view. Support for both Classic and Lightning! - 158.4K views
- Setup an awesome Salesforce developer environment with Sublime Text 3 - 122.3K views
- Writing a Schedulable Batch Apex in Salesforce - 118.8K views
Categories
- APEX
- Apps
- Custom Label
- Custom Metadata
- Custom Setting
- Design & UI
- Event
- Heroku
- iOS & Object-c
- Lightnint Component
- Linux & Mac OS
- Metadata API
- Node.js
- Open Source
- Other
- PHP Framework
- Release Notes
- REST API
- Salesforce
- Salesforce DevTools
- Salesforce DX
- SOQL
- Tooling API
- Unit Tests
- Validation Rule
- Visualforce
- WordPress
You must be logged in to post a comment.