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™ is a Chrome extension helping 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 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