本部長は管理ができない

Salesforceに関わっているエンジニアの技術メモ。ときどきそれ以外。

2013-08-01から1ヶ月間の記事一覧

表の行番号表示

apex:variableを使う page内で使用可能な変数 文字列型(?)なので、VALUEを使用し数値に変換し加算する <apex:variable var="rowNum" value="1" /> <apex:repeat value="{!list}" var="detail"> <tr> <td> <apex:outputLabel value="{!rowNum}" /> </td> <td> <apex:outputLabel value="{!detail}" /> </td> </tr> </apex:repeat></apex:variable>

List、Mapの宣言時の初期化

List<String> listFoo = new List<String> { 'Red', 'Yellow', 'Pink', 'Green', 'Purple' }; Map<String, String> mapFoo = new Map<String, String>{ 'アントニオ猪木' => '猪木寛至', 'ジャイアント馬場' => '馬場正平', '北斗晶' => '佐々木久子', 'アジャ・コング' => '宍戸江利花' };</string,></string,></string></string>

Mapの中身の確認

Integer i = 0; Map<String, String> mapFoo = new Map<String, String>(); for (String sKey : mapFoo.keySet()) { System.debug('★' + (++i) + ' : '+ sKey + ' -> ' + mapFoo.get(sKey)); }</string,></string,>

ファイル名の末尾に更新日時を付与するVBScript

エビデンスの画像ファイルに日時を付与したくて作ったもの。 以下のコードを拡張子vbsにして保存。 vbsファイルにリネーム対象のファイル(複数可)をD&Dする。 '---------------------------------------- ' ファイル名の末尾に更新日時を付与する '---------…

VisualforceからCSV出力

VisualforceページからCSVを出力する場合、apex:pageのcontentType属性に記述する。 <apex:page contentType="text/csv;charset=Shift_JIS;#fileName.csv" standardController="Contact" recordSetVar="contacts">Id,Name <apex:repeat value="{!contacts}" var="con"> {!con.Id},{!con.Name} </apex:repeat> </apex:page> apex:page text/csv これで…

ブログ始めました。

今はSalesforceに関わっているので、Salesforceの事を中心に書いて行きたいと考えています。 後はちょっとしたスクリプト。備忘的に。