Fix ‘Error: Field is not writeable’ for Master-Detail relationship

Salesforce   Developer Edition

An error “Error: Field is not writeable” will occur if you try modifying a Master-Detail relationship field in Salesforce Apex code. So how can we fix it? Maybe using the clone method to insert&delete is the only way, as the following apex code : Reference:Apex System SObject Clone Enjoy It!

read more

Salesforce Dev Tools for Chrome™

salesforce-dev-tools-for-chrome

Salesforce Dev Tools for Chrome™ is a Chrome extension helping Force.com developers do the below things: ・Export definition of objects to Excel file. ・Show / Hide object API name on object detail page by 1 Click. ・Quick generate test data Apex Code for Force.com Unit Test. ・Quick access to new record page, list page and […]

read more

Determine odd or even row in apex:repeat loop

Sometimes we need determine if the index is odd or even in tag, such as showing table row in alternate color. There’s a simple soluton as below code: Enjoy it!

read more

Usages of ID class in Salesforce

As we know that each record Id represents a unique sObject record. There are two versions of every record Id in salesforce : ・15 digit case-sensitive version which is referenced in the UI ・18 digit case-insensitive version which is referenced through the API And there are many usages of sObject ID,such as: Get the sObject […]

read more