Skip to main content

Posts

Showing posts from August, 2015

Breadcrumb in Gridbuddy

I just get to play around with Gridbuddy .While breaking an ice,I got requirement to create breadcrumb in Gridbuddy ,I referring to this site and follow the instruction.But somehow I bumped to some errors and manage to fix it.So I would like to rewrite it here so I won't forget. This is referring to Account breadcrumb because Account can have many children and grandchildren. Account A  --> Account B -->Account 1                    --->Account C -->Account 2                    --->Account D  So breakcrumb will be look like this Account A >> Account >> B >> Account 1 These are the steps: Create a number formula field to indicate hierarchy level at Account object. Create a text formula field to printout breadcrumb link Create a text formula field for Drill Up URL Add formula field to Gridbuddy field Create two actions at GridBuddy ; Drill Up and Drill Down. Add action to the Grid Step 1:Create a number formula field to indicate h

Salesforce Date format conversion

I want to change the format of Date field to M/dd/YYYY so it will be read as 07/30/2014. The field is Date datatype not Datetime datatype. Note: 1) In Date class there only format() method that will change the date format using locale. format() Returns the Date as a string using the locale of the context user 2) Only in DateTime class offer various of date formatting method. format() Converts the date to the local time zone and returns the converted date as a formatted string using the locale of the context user. If the time zone cannot be determined, GMT is used. format(dateFormatString) Converts the date to the local time zone and returns the converted date as a string using the supplied Java simple date format. If the time zone cannot be determined, GMT is used. format(dateFormatString, timezone) Converts the date to the specified time zone and returns the converted date as a string using the supplied Java simple date format. If the supplied time zone is not in th

Posting code in WP

Just trying to  post my apex code in WP. 1)Using Gist . Just copy the Gist URL into your WP post.Done.Look nice , but if you delete your file in Gist,the code in post also will be gone which I less prefer.Maybe will use it if I decide not to delete my file in Gist.  2) Using code based on Posting source code . Because this is from SyntaxHighlighter,it offered quite sophisticated features,but unfortunately I found it not able to remove the scroll bar.It got some solutions but only apply for WordPress.org only.But it nice, maybe for longer and complex code I can use this.  [code language="java" padlinenumbers="true" highlight="1"] public Map<Id,MyAgenda__c> getAgendaMap(){ agendaMap = new Map<Id,MyAgenda__c>([SELECT Id FROM MyAgenda__c WHERE Id=: this.stdController.getId() ORDER BY Date__c DESC]); return agendaMap; } [/code]  3)Using hilite.me It look nice for simple and shorter code. public Map < Id , My