<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	
	xmlns:georss="http://www.georss.org/georss"
	xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#"
	>

<channel>
	<title>ゲオログ by リバネスCIO 吉田丈治 @geeorgey</title>
	<atom:link href="http://geeorgey.com/feed" rel="self" type="application/rss+xml" />
	<link>https://geeorgey.com</link>
	<description>武器は走りながら拾え</description>
	<lastBuildDate>Fri, 30 Oct 2020 08:04:48 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.5.2</generator>
<site xmlns="com-wordpress:feed-additions:1">184897785</site>	<item>
		<title>plogで有料記事を作ってみよう</title>
		<link>https://geeorgey.com/archives/3606</link>
					<comments>https://geeorgey.com/archives/3606#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Fri, 30 Oct 2020 08:01:01 +0000</pubDate>
				<category><![CDATA[未分類]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3606</guid>

					<description><![CDATA[各種ブログプラットフォームに投げ銭機能がついている物があると思うのですが、それを ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[
<p>各種ブログプラットフォームに投げ銭機能がついている物があると思うのですが、それを任意のHTML上で実現してしまおうというサービスです。</p>



<figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
https://qiita.com/yoshinori_hisakawa/items/1359c8f541cc6b7252e4
</div></figure>



<p>こちらに詳細書いてあります。サービスページはこちら</p>



<figure class="wp-block-embed"><div class="wp-block-embed__wrapper">
https://plog.bubbleapps.io/
</div></figure>



<p>ものは試しということで試してみましょう。</p>



<figure class="wp-block-image size-large"><img data-attachment-id="3607" data-permalink="https://geeorgey.com/archives/3606/https___app_plog_cash" data-orig-file="https://geeorgey.com/wp-content/uploads/https___app_plog_cash.png" data-orig-size="3304,1378" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="https___app_plog_cash" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-300x125.png" data-large-file="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-620x259.png" loading="lazy" width="620" height="259" src="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-620x259.png" alt="" class="wp-image-3607" srcset="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-620x259.png 620w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-300x125.png 300w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-768x320.png 768w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1536x641.png 1536w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-2048x854.png 2048w" sizes="(max-width: 620px) 100vw, 620px" /><figcaption>設定画面</figcaption></figure>



<p>シンプルですね。値段を決めて、文字を入れ込みます。次へボタンを押すとこんな感じで埋め込み用のiframeが現れます。</p>



<figure class="wp-block-image size-large"><img data-attachment-id="3608" data-permalink="https://geeorgey.com/archives/3606/https___app_plog_cash-1" data-orig-file="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1.png" data-orig-size="2568,1168" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="https___app_plog_cash-1" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-300x136.png" data-large-file="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-620x282.png" loading="lazy" width="620" height="282" src="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-620x282.png" alt="" class="wp-image-3608" srcset="https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-620x282.png 620w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-300x136.png 300w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-768x349.png 768w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-1536x699.png 1536w, https://geeorgey.com/wp-content/uploads/https___app_plog_cash-1-2048x931.png 2048w" sizes="(max-width: 620px) 100vw, 620px" /></figure>



<p>で、実際に埋め込んだのが以下の部分。</p>



<iframe
  src=https://widget.plog.cash
  data-plog
  data-id=0ag6xFLMAihpfSMXkvuc
  frameborder=0>
</iframe>
<script src="https://widget.plog.cash/plog.js"></script>



<p>どうでしょう、簡単ですね。表示が新聞メディア系サイトっぽくなります。</p>



<p>現在はプレーンテキストのみの対応なので、テキストを読ませるサイトでしか使いみちがなさそうですが、コードブロックや画像なんかが貼り付けられるようになると使い勝手が良さそうですね。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3606/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3606</post-id>	</item>
		<item>
		<title>Apex,Visualforce 動的にカスタム項目を取得する</title>
		<link>https://geeorgey.com/archives/3598</link>
					<comments>https://geeorgey.com/archives/3598#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Thu, 18 Jul 2019 02:51:17 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3598</guid>

					<description><![CDATA[いつも忘れてしまうので書いとく。 参考：sobjectを利用したカスタムオブジェ ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[
<p>いつも忘れてしまうので書いとく。</p>



<p>参考：<a href="http://mnakayama.hatenablog.com/entry/sobject_select_sample">sobjectを利用したカスタムオブジェクト項目取得サンプル</a></p>



<h2>やりたいこと</h2>



<p>Visualforceページ等では、URLパラメータに連動して、様々なデータの取得を行うことが多いのですが、その際に動的に取得したいデータを変えたいことがあります。それもこれも、過去のデータ構造のせいではあるのですがそこは致し方ないので、それを乗り越えるための実装を考えることになる。(ちなみにその過去の遺産を作ったのも自分であり、十字架を背負って生きている)</p>



<p>例えば、弊社のある項目では、特定期間の売上金額を</p>



<p>2019_01__c<br>2019_02__c</p>



<p>みたいなカスタム項目にまとめており、これをURLが</p>



<p>/apex/myVisualforcePage?yearmonth=2019_01</p>



<p>の時に取得するようなことを検討することになる。</p>



<h2>まずはオブジェクトリストを取得する</h2>



<p>ここはそんなに難しくない。</p>



<pre class="wp-block-syntaxhighlighter-code">	public String getAllFieldNames(String sobjName){
		String strFieldKeys='';
		Schema.SObjectType sobjType = Schema.getGlobalDescribe().get(sobjName);
		Map&lt;String, Schema.SObjectField> fmap = sobjType.getDescribe().fields.getMap();
		for (String fieldKey : fmap.keySet()) {
			Schema.SObjectField f = fmap.get(fieldKey);
			if(strFieldKeys == ''){
				strFieldKeys = fieldKey;
			}else{
				strFieldKeys +=  ',' + fieldKey;
			}
		}
		return strFieldKeys;
	}</pre>



<p>こんな感じの関数を用意して、</p>



<pre class="wp-block-syntaxhighlighter-code">String soql = 'SELECT ' + getAllFieldNames('Opportunity') + 'FROM Opportunity WHERE 条件';
LIST&lt;Opportunity> opps = new LIST&lt;Opportunity>();
opps = Database.query(soql); </pre>



<p>としてやれば取得できる。</p>



<p>この中に以下のような項目があったとして、URLで取得したいのだ。<br>2019_01__c<br>2019_02__c</p>



<p>参考：<a href="http://mnakayama.hatenablog.com/entry/sobject_select_sample">sobjectを利用したカスタムオブジェクト項目取得サンプル</a></p>



<p>これをするには、オブジェクトを指定したリストでは不可能ぽい。なので</p>



<p>LIST&lt;Opportunity> opps = new LIST&lt;Opportunity>();<br>としたところを<br>LIST&lt;sobject>opps = new LIST&lt;sobject>();</p>



<p>としてsObject型でリストを作成する。</p>



<p>こうすると、明示的に型を指定して、項目を取得する必要があるので、2019_01__cを取得する場合は</p>



<pre class="wp-block-syntaxhighlighter-code">Integer Int_201901;
for(sObject op : opps){
 Int_201901= (Integer)op.get('2019_01__c');
}</pre>



<p>という形で取り出せる。</p>



<p>2019_01__cの部分はテキストなので、URLパラメータを取得したものを適当な変数にいれて持ち込んでも良い。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3598/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3598</post-id>	</item>
		<item>
		<title>Salesforceのフローでは大文字小文字が正確に判定される</title>
		<link>https://geeorgey.com/archives/3596</link>
					<comments>https://geeorgey.com/archives/3596#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 03 Jul 2019 07:23:12 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[Tips]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3596</guid>

					<description><![CDATA[Apexでは、英字の大文字小文字は無視されるという仕様になっているので、全体的に ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[
<p>Apexでは、英字の大文字小文字は無視されるという仕様になっているので、全体的にそういうものだと勝手に思っていたのですが、実は違います。</p>



<p>Salesforceのプロセスビルダーとフローを使って、データの有無を判定する仕組みを作っていたのですが、メールアドレスの合致判定でコケました。</p>



<p>例えば、 メールアドレスがtest@geeorgey.com というリードがあったとして、TEST@geeorgey.com というメールで、レコードを検索するとひっかからないのです。jsで判定してるんでしょうか。</p>



<p>これがわかってから、メールアドレスを含む項目をオブジェクトに含める場合は、必ず小文字化するような数式項目を作り、そこを参照するように変えました。</p>



<p>数式項目を作り、 LOWER(Email) とするだけです。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3596/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3596</post-id>	</item>
		<item>
		<title>Salesforceで多対多のコネクションを張るには</title>
		<link>https://geeorgey.com/archives/3594</link>
					<comments>https://geeorgey.com/archives/3594#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 20 Mar 2019 04:42:46 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3594</guid>

					<description><![CDATA[なんで俺は今までこれを知らなかったのかと後悔したやり方なので、Salesforc ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[
<p>なんで俺は今までこれを知らなかったのかと後悔したやり方なので、Salesforceの管理者を担う人はぜひ覚えておいてほしい。</p>



<p>通常Salesforceでは、あるオブジェクトにぶら下げた子オブジェクトを配置するということをよくやる。例示すると、例えば毎週週報を書くとすると</p>



<p>Userオブジェクト：自分のレコード<br>┗週報オブジェクト</p>



<p>という形で、週報オブジェクト側から主従関係で自分のレコードに紐付けるみたいな形にします。これは簡単、よくやる。</p>



<h2>多対多のコネクションとは</h2>



<p>上述のやり方だと、作るレコードから見て主となるレコードは一つのみである。Salesforceでは、主レコードを複数持つような構造は許されていない。そのために、こういう構造は作れないのだ。</p>



<p>例えば、イベントのチケットを取得する事を考えよう。チケットAは50枚上限だとする。Userオブジェクトにこれまでに取得したチケットをぶら下げたい。一方で、チケットAを取得した人のリストをチケットオブジェクト側にぶら下げたい。みたいなものだ。</p>



<p>Userオブジェクト：ユーザーA<br>　┣チケットA<br>　┣チケットB<br>　┗チケットC<br>Userオブジェクト：ユーザーB<br>　┣チケットA<br>　┗チケットC<br></p>



<p>チケットオブジェクト：チケットA<br>　┣ユーザーA<br>　┗ユーザーB<br>チケットオブジェクト：チケットB<br>　┗ユーザーA<br>チケットオブジェクト：チケットC<br>　┣ユーザーA<br>　┗ユーザーB</p>



<p>チケットオブジェクト側で主従関係を設定してユーザと紐づけてしまうとこういう設定はできない。で、どうするかというとこうなる。</p>



<h2>多対多リレーションの作成</h2>



<p>参考：<a href="https://help.salesforce.com/articleView?id=relationships_manytomany.htm&amp;language=ja&amp;r=https%3A%2F%2Fwww.google.com%2F&amp;type=5">https://help.salesforce.com/articleView?id=relationships_manytomany.htm&amp;language=ja&amp;r=https%3A%2F%2Fwww.google.com%2F&amp;type=5</a></p>



<p>要は、多対多リレーションを作成したいオブジェクトの中間に、ダミーのオブジェクトを配置せよという事だ。</p>



<p>ユーザー←接続用オブジェクト→チケット</p>



<p>という形で主従関係で双方をつなぐのである。</p>



<p>運用としては、まずチケットオブジェクトにチケットA,B,Cを登録する。</p>



<p>次に、ユーザオブジェクトからダミーオブジェクトのレコードを作成し、チケットを選択して保存する。</p>



<p>チケット側には関連リストとしてユーザリストを表示するようにできるし、逆にユーザ側には取得したチケットリストを表示することができるようになる。ついでにいうと、中間オブジェクトにチケットの有効無効といったステータスや、支払い済みフラグみたいなものを設ける事もできる。実体となるような対象は接続先の終端のオブジェクトとして作り、そのステータス情報みたいなものを中間オブジェクト側にもつような形にする。</p>



<amp-fit-text layout="fixed-height" min-font-size="14" max-font-size="48" height="50"><p>何だよまじかよこんな形で実現するんかーいと肩を落としたのが僕でしたとさ。めたくそ便利なのでぜひ頭の片隅に入れておいてくれると良いと思います。</p></amp-fit-text>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3594/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3594</post-id>	</item>
		<item>
		<title>リバネスの会員サービスをHeroku,AWS,Salesforce,Einstein Analyticsで構築しました</title>
		<link>https://geeorgey.com/archives/3583</link>
					<comments>https://geeorgey.com/archives/3583#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Mon, 04 Mar 2019 01:41:24 +0000</pubDate>
				<category><![CDATA[Heroku]]></category>
		<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3583</guid>

					<description><![CDATA[先程Twitter見てたらテラスカイさんのリリースが流れてきました。 フォトハウ ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[
<p>先程Twitter見てたらテラスカイさんのリリースが流れてきました。</p>



<p><a href="https://www.terrasky.co.jp/news/2019/02/05/memoris.php" target="_blank" rel="noreferrer noopener" aria-label="フォトハウスMemorisの会員サイトをマルチクラウドで構築 (opens in a new tab)">フォトハウスMemorisの会員サイトをマルチクラウドで構築</a></p>



<p>は！ここで書かれてることと同じことを弊社リバネスも2019/3/1付でリリースしたのです。先を越されてしまった(笑</p>



<p>リバネスの会員サイトリバネスID：<a href="https://id.lne.st" target="_blank" rel="noreferrer noopener" aria-label="https://id.lne.st (opens in a new tab)">https://id.lne.st</a></p>



<p>構成はほぼ同じです。</p>



<figure class="wp-block-image"><img data-attachment-id="3584" data-permalink="https://geeorgey.com/archives/3583/lnestid" data-orig-file="https://geeorgey.com/wp-content/uploads/lnestID.png" data-orig-size="1804,996" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="lnestID" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/lnestID-300x166.png" data-large-file="https://geeorgey.com/wp-content/uploads/lnestID-620x342.png" loading="lazy" width="620" height="342" src="https://geeorgey.com/wp-content/uploads/lnestID-620x342.png" alt="" class="wp-image-3584" srcset="https://geeorgey.com/wp-content/uploads/lnestID-620x342.png 620w, https://geeorgey.com/wp-content/uploads/lnestID-300x166.png 300w, https://geeorgey.com/wp-content/uploads/lnestID-768x424.png 768w, https://geeorgey.com/wp-content/uploads/lnestID.png 1804w" sizes="(max-width: 620px) 100vw, 620px" /><figcaption>リバネスID構築環境</figcaption></figure>



<h2>そもそもなぜこんなことしてるのか</h2>



<p>リバネスでは、<a rel="noreferrer noopener" aria-label="リバネス研究費 (opens in a new tab)" href="http://r.lne.st/grants" target="_blank">リバネス研究費</a>、<a rel="noreferrer noopener" aria-label="TECH PLANTER (opens in a new tab)" href="https://techplanter.com/" target="_blank">TECH PLANTER</a>、<a rel="noreferrer noopener" aria-label="サイエンスキャッスル研究費 (opens in a new tab)" href="https://s-castle.com/castlegrant/" target="_blank">サイエンスキャッスル研究費</a>、<a rel="noreferrer noopener" aria-label="マリンチャレンジプログラム (opens in a new tab)" href="https://lne.st/business/marinechallenge/" target="_blank">マリンチャレンジプログラム</a>、<a rel="noreferrer noopener" aria-label="超異分野学会 (opens in a new tab)" href="https://hic.lne.st/" target="_blank">超異分野学会</a>、<a href="https://cdf.lne.st/" target="_blank" rel="noreferrer noopener" aria-label="キャリアディスカバリーフォーラム (opens in a new tab)">キャリアディスカバリーフォーラム</a>など、参加型の企画が多数展開しています。これまではそれぞれ別サービスでIDを作ってもらい情報登録をしてもらっていたのですが、流石に煩雑であろうと。加えて、管理側からみると、IDが分散しているので、いま現時点で一番アクティブな人ってだれなんだろう？と思ったら全データ引っ張り出して突き合わせないとできませんでした。動きが遅くなりますし、遅くなるというかそんなこともあり分析がやれていません。もったいないですね。情報がほしいであろう人に適切に届ける体制が作れていないのは由々しき問題であろうということでリバネスIDというサービスによって1人に1つのIDを提供し、その上で様々な活動に参加してもらおうということに決めました。</p>



<p>加えて、これらの会員機能は昨年まではSalesforceのCommunity Cloudを使っていたのですが、ライセンス費用がかなりかさみます。弊社に存在するIDの総数は5万超という感じでしたので、これをCommunityCloud上で構築するとコストが合わないなという感じだったことも構築の理由です。何しろ日常的につかうというよりは、申請テーマが合致した場合にログインして情報を登録するという使い方なので、アクティブな時期に山があるんですよね。</p>



<h2>やってみてどうだったか</h2>



<h3><i class="fa fa-check-circle"></i><span>Heroku connectがかなり良い</span></h3>



<p>Heroku上ではPostgresによってデータベースが構築されており、これを使ってWebサービスを展開しています。Heroku Connectを使うことで、このPostgresの情報をSalesforceの特定のオブジェクトに同期できます。</p>



<p>これを構築するに当たり、Salesforce側のデータ構造も見直し、リバネスIDというオブジェクトに全てが紐づく形へと移行しました。これはなれた人なら大した作業では無いと思います。</p>



<p>今まで成り行きで作っていた項目も見直し、グローバル選択リストを共通で利用するようにして管理工数の削減も同時に実現しています。サービスのリプレースを行うことで内部のデータがスッキリしました。素晴らしい。</p>



<h3><i class="fa fa-check-circle"></i><span>開発者の切り分けが可能</span></h3>



<p>私自身はSalesforceの内側の開発を主に担当しています。Heroku ConnectによってデータはSalesforce側に同期する訳ですから、実はHeroku側に管理画面がありません。フロントエンドを担うエンジニアには、フロント側のみの開発に専念してもらうことができました。もちろんSalesforceのオブジェクト側で選択リスト項目を使っている場合はHeroku側でも、同じValueを与えないとエラーになるのでそこだけは合わせる必要がありますが、開発担当領域の切り分けが可能なのは非常に良かったです。</p>



<h2>分析はEinstein Analyticsで</h2>



<p>会員データの分析ダッシュボードもHeroku上には持っていません。こちらはSalesforceに同期したデータをEinstein AnalyticsというBIツールを使って出力しています。構築作業が一瞬で終わります。これは神機能。</p>



<figure class="wp-block-image"><img data-attachment-id="3585" data-permalink="https://geeorgey.com/archives/3583/idonea" data-orig-file="https://geeorgey.com/wp-content/uploads/idonEA.png" data-orig-size="1444,917" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="idonEA" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/idonEA-300x191.png" data-large-file="https://geeorgey.com/wp-content/uploads/idonEA-620x394.png" loading="lazy" width="620" height="394" src="https://geeorgey.com/wp-content/uploads/idonEA-620x394.png" alt="" class="wp-image-3585" srcset="https://geeorgey.com/wp-content/uploads/idonEA-620x394.png 620w, https://geeorgey.com/wp-content/uploads/idonEA-300x191.png 300w, https://geeorgey.com/wp-content/uploads/idonEA-768x488.png 768w, https://geeorgey.com/wp-content/uploads/idonEA.png 1444w" sizes="(max-width: 620px) 100vw, 620px" /><figcaption>Einstein Analyticsによるデータ出力<br></figcaption></figure>



<h3><i class="fa fa-check-circle"></i><span>帳票出力はVisualforceで</span></h3>



<p>入力されたデータは、研究費の申請データだったり、審査が必要なものが多いので、テーマごとにデータを集約した審査用ファイルを作る必要があります。これはVisualfoce Pageを使って出力。PDFにして閲覧したり、お客様に納品をしたりといったことが可能になっています。基本的には出力のみなのでVisualforceページの開発コストは大したこと無いです。これまでに作ったものを応用して2時間程度といった所でしょうか。こんな感じになっています↓</p>



<p>AWSにアップした画像もこちらから参照して出力するようになっています。</p>



<figure class="wp-block-image"><img data-attachment-id="3586" data-permalink="https://geeorgey.com/archives/3583/attachment-0" data-orig-file="https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c.png" data-orig-size="2478,1242" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="PDF出力ページ" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c-300x150.png" data-large-file="https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c-620x311.png" loading="lazy" width="620" height="311" src="https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c-620x311.png" alt="" class="wp-image-3586" srcset="https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c-620x311.png 620w, https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c-300x150.png 300w, https://geeorgey.com/wp-content/uploads/49300cccbab53f2472ec9cdc453b601c-768x385.png 768w" sizes="(max-width: 620px) 100vw, 620px" /><figcaption>リバネス研究費申請書の出力用ページ</figcaption></figure>



<p>以上です</p>



<p>運用は始まったばかりですので、これからなにか出てくるのかもしれませんが、今の所は満足度の高い構築ができました。これを土台にしてより良いサービスへと進化させたいと思います。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3583/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3583</post-id>	</item>
		<item>
		<title>Einstein Analyticsを使って一ヶ月。良い点悪い点。Visualforce,Apexとの比較</title>
		<link>https://geeorgey.com/archives/3579</link>
					<comments>https://geeorgey.com/archives/3579#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 13 Feb 2019 01:32:13 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[未分類]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3579</guid>

					<description><![CDATA[2019年明けてからEinstein Analyticsを契約しました。 散々自 ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[
<p>2019年明けてから<a href="https://www.salesforce.com/jp/products/einstein-analytics/overview/">Einstein Analytics</a>を契約しました。</p>



<p>散々自作ダッシュボードをvisualforceで作りまくっていた私ではありますが、公式に提供されているものを使うことでやりたいことの実装速度があがるならそのほうがいいだろうということでお試し2ライセンス。</p>



<h2>圧倒的に良い点</h2>



<p>Einstein AnalyticsはSalesforceにあるデータ(その他のデータソースも利用可能)を、定期的なスケジュールでEinsitein Analytics側のストレージにコピーしてくるという仕様になっています。これが意味することはなにか。</p>



<p>上述したようにVisualforce上でApexを使ってグラフを書いたりしたいと思うと制限が多いです。例えば、SOQLでデータを取得する時にGROUP BYでグループ化したものを使いたい場合を考えると、<strong>GROUP BYは数式項目が使えません</strong>。それなので、一度その数式項目をコピーするようなテキスト項目を追加し、データローダー等でデータをコピーする必要があります。それをやると何が起こるかというと、最終更新者と最終更新日時が一括で変更されます。微妙じゃないですか？</p>



<p>Einstein Analyticsは、グラフ化したりテーブル表示したりする場合は、そもそも使うデータがコピーしてきたテキストデータですから、どんな項目でもグループ化できます。これだけでもうめちゃ良いですね。</p>



<figure class="wp-block-image"><img data-attachment-id="3581" data-permalink="https://geeorgey.com/archives/3579/einsteinanalytics" data-orig-file="https://geeorgey.com/wp-content/uploads/einsteinanalytics.jpg" data-orig-size="1684,917" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="einsteinanalytics" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/einsteinanalytics-300x163.jpg" data-large-file="https://geeorgey.com/wp-content/uploads/einsteinanalytics-620x338.jpg" loading="lazy" width="620" height="338" src="https://geeorgey.com/wp-content/uploads/einsteinanalytics-620x338.jpg" alt="" class="wp-image-3581" srcset="https://geeorgey.com/wp-content/uploads/einsteinanalytics-620x338.jpg 620w, https://geeorgey.com/wp-content/uploads/einsteinanalytics-300x163.jpg 300w, https://geeorgey.com/wp-content/uploads/einsteinanalytics-768x418.jpg 768w, https://geeorgey.com/wp-content/uploads/einsteinanalytics.jpg 1684w" sizes="(max-width: 620px) 100vw, 620px" /><figcaption>こんな感じのダッシュボードが慣れれば10分程度で作れます</figcaption></figure>



<h2>イマイチな点</h2>



<p>リストをテーブル表示する際に表示のリミットが少なすぎる。</p>



<blockquote class="wp-block-quote"><p>100 (異なる値を設定するには、SAQL の&nbsp;<code>limit</code>&nbsp;ステートメントを使用)<br><br>https://help.salesforce.com/articleView?id=bi_limits.htm&amp;type=5</p></blockquote>



<p>おそらく変えられると思うのでここは問題ないかもしれない。</p>



<h2>イマイチな点２</h2>



<p>毎度のことですが、スタート時のサポートが薄い！！新規契約なんだから契約スタート時に最初にやることは？とかTrailheadの案内とかメールでくれれば良いのにねぇ。ってめっちゃ思ってます。送ってくるサービスもあるんだけどなー、ばらつきがあるよね。</p>



<h2>イマイチな点3</h2>



<p>ライセンスが高い。グラフやダッシュボードを見るだけライセンスをもう少しお安くしていただくことはできないのか！！ダッシュボードを作るのは正直ちょっと難しさもあるので全員にはいらないよなと思うのですが、SalesCloudの画面に貼り付けてみんなに見せたいっていうときに閲覧ライセンスもそれなりのお値段がする。もう少し下げてほしい！現在は仕方がないので、共有用に画像生成してシェアしてます。それでも良いインサイトを提供できるっちゃできる。</p>



<h2>総評</h2>



<p>機能的な側面については実はそんなに不満がありませんでした。使いこなせるようになってきて良さが分かるようになってきました。あとはレシピを理解できれば、かなり色々なことが処理できると思う。Einstein Analytics良いぞ。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3579/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3579</post-id>	</item>
		<item>
		<title>続 slackからチームスピリットの打刻を行うには -botkit express mongodbでの実装-</title>
		<link>https://geeorgey.com/archives/3575</link>
					<comments>https://geeorgey.com/archives/3575#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Tue, 11 Dec 2018 07:01:25 +0000</pubDate>
				<category><![CDATA[Heroku]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[slack]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3575</guid>

					<description><![CDATA[前回のpostはこちら：https://geeorgey.com/archive ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>前回のpostはこちら：<a href="https://geeorgey.com/archives/3569">https://geeorgey.com/archives/3569</a></p>
<p>前回までの機能では、Salesforceのセッションが切れた場合、再度OAuth用のリンクを踏んでセッション情報を取得する必要がありました。チームスピリットの打刻は出勤日に使うので、毎朝セッションが切れていると不便で仕方がありません。</p>
<p>そこで、SalesforceAPIにはセッションが切れた場合に、新しくアクセストークンを取得する仕組みがあるので、そちらの実装を行ったのが今回のアップデートです。</p>
<p>Salesforceのセッション情報はmongoDB上に保管され、時間が経ちセッションが切れると、その情報を使って新しいアクセストークンを取得、そちらのデータでmongoDB上のデータを置き換えます。そうすることで、一度Salesforceとの接続処理を行っておけば、再度セッション情報を取得する必要がなくなります。この実装をしないと実用に耐えません。</p>
<h2>使い方</h2>
<p>設定等については前回の投稿を参照してください。 <a href="https://geeorgey.com/archives/3569">https://geeorgey.com/archives/3569</a></p>
<p>mongoDBに sfusers という名前のコレクションを加えてください。その中にデータが保存されます。</p>
<h2>GitHub</h2>
<p><a href="https://github.com/geeorgey/ts-dakoku-node-express" target="_blank" rel="noopener">https://github.com/geeorgey/ts-dakoku-node-express</a></p>
<p>&nbsp;</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3575/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3575</post-id>	</item>
		<item>
		<title>slackからチームスピリットの打刻を行うには -botkit express mongodbでの実装-</title>
		<link>https://geeorgey.com/archives/3569</link>
					<comments>https://geeorgey.com/archives/3569#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 05 Dec 2018 04:46:10 +0000</pubDate>
				<category><![CDATA[Heroku]]></category>
		<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[slack]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3569</guid>

					<description><![CDATA[# ts-dakoku-node-express コードはGithub ベース： ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<div>
<div># ts-dakoku-node-express</div>
</div>
<div><a href="https://github.com/geeorgey/ts-dakoku-node-express" target="_blank" rel="noopener">コードはGithub</a></div>
<div></div>
<div>
<div>ベース： Slackforce https://github.com/ccoenraets/slackforce</div>
<h2>実現されること</h2>
<div>&#8211; slackのスラッシュコマンドからチームスピリットの打刻を行うことができる</div>
<div>&#8211; スラッシュコマンドを使ったslackアプリの拡張性を考慮してあります。</div>
<h2>環境</h2>
<div>&#8211; node.js</div>
<div>&#8211; botkit</div>
<div>&#8211; express //webサーバ</div>
<div>&#8211; mongodb //slackの認証情報の保存</div>
<div>node.js上で動きます。私の環境ではheroku上で可動しています。</div>
<h2>チームスピリットの打刻用Apexについて</h2>
<div>ngs/ts-dakoku をそのまま使わせてもらっています(ngsさんに感謝)</div>
<div>https://github.com/ngs/ts-dakoku/tree/master/apex/src/classes</div>
<div>こちらの２つのクラスを本番環境にデプロイして使ってください</div>
<div>&#8211; TSTimeTableAPIController.cls</div>
<div>&#8211; TSTimeTableAPIControllerTest.cls</div>
<div>設定等についてはこちらを参照：https://ja.ngs.io/2018/02/14/ts-dakoku/</div>
<h2>Salesforceで接続アプリケーションを作る</h2>
<div>&#8211; アプリ名: 任意</div>
<div>&#8211; API Name: 任意</div>
<div>&#8211; Contact Email: 管理者のEmail</div>
<div>&#8211; OAuth 設定: チェックを入れてください</div>
<div>&#8211; コールバック URL: https://myapp.herokuapp.com/oauthcallback (これは後でherokuアプリを立ち上げたあとに書き換えます)</div>
<div>Selected OAuth Scopes: Full Access (full)</div>
<div>&#8211; 保存する</div>
<h2>herokuアプリを作る</h2>
<div>heroku CLIをインストール</div>
<div>$ heroku login</div>
<div>// メアドとパス・二段階認証でログイン</div>
<div>$ heroku create appName</div>
<div>//appNameは任意</div>
<div>//ここまでやるとアプリURLが発行されるので先程作ったSalesforceアプリのコールバックURL(https://myapp.herokuapp.com)部分を置き換えてください</div>
<div>ここからはGUI。 https://dashboard.heroku.com にログインして先程作ったアプリの設定画面を開く</div>
<div>Resources画面に行き、add-onにmLab MongoDBを追加</div>
<div>Settings画面に行き、Reveal config varsボタンを押して環境変数を設定します</div>
<h2>slackアプリを作る</h2>
<div>https://api.slack.com/apps</div>
<div>Create new appする</div>
<div>Basic Informationにある[Client ID][Client Secret][Verification Token]を以下で使います</div>
<div>Interactive Componentsに移動してRequest URLに</div>
<div>先程herokuで作ったアプリのURL/slack/receive を設定する</div>
<h2>スラッシュコマンドを作る</h2>
<div>slackアプリのスラッシュコマンドページへ行き、Create New Commandを押す</div>
<div>コマンド名： /ts</div>
<div>Request URL: herokuアプリのURL/ts</div>
<div>Short Description: チームスピリット打刻コマンド</div>
<h2>herokuの環境変数</h2>
<div>&#8211; MONGODB_URI herokuのadd onで mLab MongoDB :: Mongodb をインストールすると自動的に入ります</div>
<div>&#8211; SF_CLIENT_ID //先程Salesforceで作ったアプリのID</div>
<div>&#8211; SF_CLIENT_SECRET //先程Salesforceで作ったアプリのsecret</div>
<div>&#8211; SF_LOGIN_URL //自分のSalesforceのURL。https://[任意の文字列].my.salesforce.com</div>
<div>&#8211; SF_USER_NAME //管理者のメアド</div>
<div>&#8211; SF_PASSWORD //管理者のパス</div>
<div>&#8211; SLACK_ID // Slackアプリの[Client ID]</div>
<div>&#8211; SLACK_REDIRECT // herokuで作成したアプリのURL</div>
<div>&#8211; SLACK_SECRET // Slackアプリの[Client Secret]</div>
<div>&#8211; VERIFICATION_TOKEN // slackアプリの[Verification Token]</div>
<div>以下についてはslackforceで設定されているものなのですが、VERIFICATION_TOKENと同じものです。追加するのが面倒な場合は、modules/**.js内部の変数名をVERIFICATION_TOKENに変更してしまうことで一つですみます</div>
<div>&#8211; SLACK_WHOAMI_TOKEN</div>
<div>&#8211; SLACK_ACCOUNT_TOKEN</div>
<div>&#8211; SLACK_CASE_TOKEN</div>
<div>&#8211; SLACK_CONTACT_TOKEN</div>
<div>&#8211; SLACK_OPPORTUNITY_TOKEN</div>
<h2>使い方</h2>
<div>https://任意のアプリ名.herokuapp.com/oauthcallback</div>
<div>こちらにアクセスして、アプリを組織にインストールします。</div>
<div></div>
<div>インストール後は、slackで /ts と打つとslashコマンドが起動します</div>
<div>最初はSalesforceへのログイン認証が必要なので、表示されるURLをクリックしてログイン情報を登録します</div>
<div><a href="https://geeorgey.com/wp-content/uploads/herokulogin.png"><img data-attachment-id="3570" data-permalink="https://geeorgey.com/archives/3569/herokulogin" data-orig-file="https://geeorgey.com/wp-content/uploads/herokulogin.png" data-orig-size="824,284" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="herokulogin" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/herokulogin-300x103.png" data-large-file="https://geeorgey.com/wp-content/uploads/herokulogin-620x214.png" loading="lazy" class="aligncenter size-large wp-image-3570" src="https://geeorgey.com/wp-content/uploads/herokulogin-620x214.png" alt="" width="620" height="214" srcset="https://geeorgey.com/wp-content/uploads/herokulogin-620x214.png 620w, https://geeorgey.com/wp-content/uploads/herokulogin-300x103.png 300w, https://geeorgey.com/wp-content/uploads/herokulogin-768x265.png 768w, https://geeorgey.com/wp-content/uploads/herokulogin.png 824w" sizes="(max-width: 620px) 100vw, 620px" /></a></div>
<div>(注意：こちらのデータもmongodbに入れるべきなのですが未実装です)</div>
<div>ログインしたら再度 /ts と打つと、出勤/退勤/キャンセルボタンが表示されますのでボタンを押して打刻してください</div>
<div><img data-attachment-id="3571" data-permalink="https://geeorgey.com/archives/3569/herokuts" data-orig-file="https://geeorgey.com/wp-content/uploads/herokuts.png" data-orig-size="642,226" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="herokuts" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/herokuts-300x106.png" data-large-file="https://geeorgey.com/wp-content/uploads/herokuts-620x218.png" loading="lazy" class="aligncenter size-large wp-image-3571" src="https://geeorgey.com/wp-content/uploads/herokuts-620x218.png" alt="" width="620" height="218" srcset="https://geeorgey.com/wp-content/uploads/herokuts-620x218.png 620w, https://geeorgey.com/wp-content/uploads/herokuts-300x106.png 300w, https://geeorgey.com/wp-content/uploads/herokuts.png 642w" sizes="(max-width: 620px) 100vw, 620px" /></div>
<div>ボタンを押した時間が出退勤時間となります。</div>
<div>ボタンを押すと打刻完了状態へ</div>
<div><img data-attachment-id="3572" data-permalink="https://geeorgey.com/archives/3569/ts2" data-orig-file="https://geeorgey.com/wp-content/uploads/ts2.png" data-orig-size="498,144" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ts2" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/ts2-300x87.png" data-large-file="https://geeorgey.com/wp-content/uploads/ts2.png" loading="lazy" class="aligncenter size-full wp-image-3572" src="https://geeorgey.com/wp-content/uploads/ts2.png" alt="" width="498" height="144" srcset="https://geeorgey.com/wp-content/uploads/ts2.png 498w, https://geeorgey.com/wp-content/uploads/ts2-300x87.png 300w" sizes="(max-width: 498px) 100vw, 498px" /></div>
<div>打刻が完了済みの場合や、休暇申請がされている場合はその旨表示されます</div>
<div><img data-attachment-id="3573" data-permalink="https://geeorgey.com/archives/3569/ts3" data-orig-file="https://geeorgey.com/wp-content/uploads/ts3.png" data-orig-size="718,228" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="ts3" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/ts3-300x95.png" data-large-file="https://geeorgey.com/wp-content/uploads/ts3-620x197.png" loading="lazy" class="aligncenter size-large wp-image-3573" src="https://geeorgey.com/wp-content/uploads/ts3-620x197.png" alt="" width="620" height="197" srcset="https://geeorgey.com/wp-content/uploads/ts3-620x197.png 620w, https://geeorgey.com/wp-content/uploads/ts3-300x95.png 300w, https://geeorgey.com/wp-content/uploads/ts3.png 718w" sizes="(max-width: 620px) 100vw, 620px" /></div>
<h2>botkitについて</h2>
<div>botkit.jsでbotkitの基本的な機能の実装が可能です</div>
<div>interactive_message_callbackについてはここで受けることが出来ません。</div>
<div>エンドポイントは、 modules/receive.js で作成してあるのでそちらで定義してください</div>
<h2>server.jsについて</h2>
<div>スラッシュコマンドを追加する場合はserver.jsに定義し、 mobules/ にファイルを設置しています。</div>
<h2>debugについて</h2>
<div>設定が完了している場合、作ったbotに向けてDMで hello と入れると、コメントが返ってくるはずです。</div>
<div></div>
</div>
<h2>herokuアプリについて</h2>
<div>無料プランで使うとdynoがスリープしてしまうので、そのあたりのケアもしましょう。ぐぐると出てくると思います。</div>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3569/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3569</post-id>	</item>
		<item>
		<title>[salesforce]承認プロセス終了のタイミングでプロセスは呼び出せないのでトリガーを使うという話</title>
		<link>https://geeorgey.com/archives/3566</link>
					<comments>https://geeorgey.com/archives/3566#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 21 Nov 2018 03:09:50 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3566</guid>

					<description><![CDATA[Salesforceの主要機能である商談管理。弊社リバネスではこれに経費データを ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>Salesforceの主要機能である商談管理。弊社リバネスではこれに経費データをぶら下げて、商談から稟議承認プロセスを回していました。</p>
<p>四年前であれば、それでもまぁ行けたのですが、ここ数年、事業のスピードが早くなってきたこともあり、承認申請プロセスの最中だと商談がロックされて手が出せないこともあり、関連するデータの更新が滞るという事が度々起こりました。</p>
<h2>対策</h2>
<p>対策はシンプルに、承認プロセスは対象オブジェクトに対して行うという形にしようというものです。</p>
<p>今までこれをやらなかった理由は、商談ページ上で完結できなかったためです。つまり、経費オブジェクト上で承認プロセスを回したいなら経費オブジェクトを開いた上でやらなくてはなりません。Salesforce経験が浅いタイミングでこれをやるのは混乱の下だと判断しました。</p>
<p>今回、この実装に踏み切ろうと考えたのは、承認申請ボタンをVisualforce等を介して商談ページ上に表示ができるからです。今回はそこには触れませんが、一応そのような形で実装しています。</p>
<h2>実装方法１：だめだったパターン</h2>
<p>経費オブジェクトには経費明細オブジェクトが主従関係でぶら下がっていまして、その中に経費の細かい情報が入ります。</p>
<p>例えば、出張経費という経費オブジェクトを作り、その中に経費明細オブジェクトとして、「飛行機代」「電車代」「宿泊費」「その他経費」…という形で、経費明細を作っていきます。</p>
<p>経費上で稟議の承認プロセスを回し、承認されたら項目自動更新で経費オブジェクトに作成した承認フラグ(チェックボックス型)をTrueにします。</p>
<p>プロセスビルダーから経費オブジェクトに対してプロセスを作成し、承認フラグが更新された＝Trueと承認フラグがTrueという条件でプロセスを開始します。</p>
<p>プロセスからはフローを呼び出し、経費オブジェクトIDにぶら下がっている経費明細オブジェクトの承認フラグをTRUEに変更する、という処理です。</p>
<h3><i class="fa fa-check-circle"></i><span>何がだめだったか</span></h3>
<p>承認フローの完了タイミングで発生する項目自動更新からはプロセスが起動しないようです。</p>
<p>参考：<a href="https://help.salesforce.com/articleView?id=workflow_field_update_considerations.htm&amp;type=5" target="_blank" rel="noopener">項目自動更新アクションの考慮事項</a><br />
「承認時のアクションとして実行される項目自動更新は、ワークフロールールやエンタイトルメントプロセスをトリガしません。」</p>
<p>ということで諦めました。</p>
<h2>成功パターン：トリガー書く</h2>
<p>ちょっと面倒ですが、トリガー書きましょう。</p>
<p>after updateで、経費IDから経費明細引っ張ってきて、承認フラグをTrueに変えてupdateかければ良いだけです。シンプル。。。</p>
<p>ということで、仕様が分からずにちょっとハマったよという報告です。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3566/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3566</post-id>	</item>
		<item>
		<title>共有・意識喚起のslackと、実行催促のsalesforce chatterという使い分け</title>
		<link>https://geeorgey.com/archives/3560</link>
					<comments>https://geeorgey.com/archives/3560#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Mon, 12 Nov 2018 05:59:36 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<category><![CDATA[slack]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3560</guid>

					<description><![CDATA[前回こんな事を書きました Lightning Component開発でいろんなオ ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>前回こんな事を書きました</p>
<p><a href="https://geeorgey.com/archives/3555" target="_blank" rel="noopener">Lightning Component開発でいろんなオブジェクトを作って設置してみたらSalesforceの便利度が激増したという話</a></p>
<p>Qiitaには実際のコード付きでこんなことも書きました<br />
<a class="u-link-no-underline" href="https://qiita.com/geeorgey/items/e25daaf97ed2f9721c6c">Lightning componentでteamspiritの勤怠打刻を行う</a></p>
<p>今回は、Lightning Componentを作っていて、slackとchatterの使い分けがわかりやすくなってきたなと感じたのでそのまとめです。</p>
<h2>これまでの使い方</h2>
<p>これをSalesforceの方に言うと、あんまりいい顔されないのですが(そりゃそうだとはおもう）社内チャットツールはslackを使っていて、chatterは使ってなかったんですね。</p>
<p>slackはやはりその強力なインテグレーション機能が便利で、slack上では日常的なスタッフのやり取りのみではなく、バッチ処理の結果を流したり、<br />
<a class="u-link-no-underline" href="https://qiita.com/geeorgey/items/784a4586bbd551abcdb0">休暇を取っているスタッフにslackでmentionしたときに教えてくれるbotを作った</a></p>
<p>こんな事をやったりと、便利に使っていた訳です。</p>
<p>一方でchatterには、直接的な商談上のやり取り等の、その対象レコードについてのやり取りが成されているという感じです。</p>
<p>日常的に使うのはslackで、異常値などについての指摘が入るのがchatterというイメージ。それゆえに、Salesforce自体は必要な時にしか使わず、なんとなくの情報収集からがっつりとした指示出しみたいなものまで、基本的にはslackが使われています。アプリケーションの使用頻度が全く違うと思う。</p>
<h2>これからの使い方として気づいた点</h2>
<p>ヒントは社員からのニーズだったのですが、先のリンクに書いたように、チームスピリットの打刻機能を実装したのですが、そもそもとして打刻忘れを通知してほしいというのです。</p>
<p>人間ですから、忘れることは当然ありますので、なるほどなるほどと、実装をしようかなと考えていたのですが</p>
<p>slackでも通知だけならできます。打刻してない人のリストを作って、slackに通知すればよいのですから。</p>
<p>だが、一点課題になるのは、アクションを促すには一歩遠いなと。</p>
<p>例えば、slackに勤怠打刻用のLightning ComponentのURLを投げたとして、そのURLをクリックするとブラウザが開きます。ログインしてなければ、ログインする必要が出てきてしまう。ここで離脱する人は多そうですよね。自分も離脱するとおもう。</p>
<p>そこで、アクションを促すならchatterで通知したほうが良いだろうと思い至った訳です。</p>
<p>chatterで通知してあげれば、アラートがモバイル端末にも上がります。リンクをクリックすれば該当のLightning Componentが表示され、アクションがしやすい。</p>
<h2>共有・意識喚起のslackと、実行催促のsalesforce chatterという使い分け</h2>
<p>というわけで、そこになにかのデータがありますよという通知や、チームメンバー内での共有にはslackが強く、実際に該当者に向けてアクションを促しアクションにつなげたいと強く願う場合はchatterへの通知を使うのが良いのかなというものでした。</p>
<h2>より強い実行に向けて何をすべきか</h2>
<p>チームスピリットの打刻の部分で参考にしたプログラムでは、slack上からボタンを押すことでSalesforce内のデータをアップデートしています。</p>
<p>一定のトリガーが引かれたら、何をすべきかがslack上で通知され、ボタンを押すやら、何かを入力してEnterを押すことで情報のupdateができてしまう。</p>
<p>そこまでできれば、chatter使わなくてもslack上で完結してしまうんですけどね。まだ技術力不足で完成しておりません。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3560/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3560</post-id>	</item>
		<item>
		<title>Lightning Component開発でいろんなオブジェクトを作って設置してみたらSalesforceの便利度が激増したという話</title>
		<link>https://geeorgey.com/archives/3555</link>
					<comments>https://geeorgey.com/archives/3555#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 24 Oct 2018 10:09:32 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3555</guid>

					<description><![CDATA[Salesforceユーザの皆様こんばんは。巷ではLightning Exper ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>Salesforceユーザの皆様こんばんは。巷ではLightning Experience、略してLEXの利用が推奨されて久しいですが皆さんの環境はいかがでしょうか。</p>
<p>弊社リバネスでは、Salescloud Einstein導入時にLEXへ移行してみたのですが、如何せん使いづらいこともあって行ったり来たりしていました。</p>
<p>しかし、LEXが圧倒的に便利だなと言う感覚が分かってきたので共有したいと思います。</p>
<h2>恐らく肝はLightning Component</h2>
<p>Lightning Componentっていうのは、機能が詰まったモジュールという感じで、いろんな場所に配置することが出来ます。</p>
<p>最初はこれ、何に使うんだよと思っていたのですが、使い所がやっとこ分かってきました。</p>
<h3><i class="fa fa-check-circle"></i><span>トップページへの配置</span></h3>
<p><div id="attachment_3556" style="width: 630px" class="wp-caption aligncenter"><a href="https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP.jpg"><img aria-describedby="caption-attachment-3556" data-attachment-id="3556" data-permalink="https://geeorgey.com/archives/3555/leaveanestsalesforcetop" data-orig-file="https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP.jpg" data-orig-size="2336,1512" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="LeaveanestSalesforceTOP" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP-300x194.jpg" data-large-file="https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP-620x401.jpg" loading="lazy" class="size-large wp-image-3556" src="https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP-620x401.jpg" alt="" width="620" height="401" srcset="https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP-620x401.jpg 620w, https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP-300x194.jpg 300w, https://geeorgey.com/wp-content/uploads/LeaveanestSalesforceTOP-768x497.jpg 768w" sizes="(max-width: 620px) 100vw, 620px" /></a><p id="caption-attachment-3556" class="wp-caption-text">リバネスのSalesforceトップ画面はこんな感じ</p></div></p>
<p>左上にあるニュースなんかはSalesforceのデフォルトのコンポーネントです。</p>
<p>オレンジ部分が、作ったコンポーネント。こんな感じでトップページにモジュールをホイホイ足して行くことが出来ます。</p>
<p>凝った開発なんぞしなくてもレポートで作ったグラフを表示させることも出来ますし、ビューを適切に作っておいてそれを表示させるなんてことも出来ます。</p>
<p>ぱっとひと目見た時に入ってくる情報がコントロール出来るのが良いのではないでしょうか</p>
<h2>モバイルアプリの活用方法が見えてきた</h2>
<p>Lightning ComponentはLightningアプリビルダーを使って配置すればモバイルアプリに簡単に設定が可能です。</p>
<p>&nbsp;</p>
<p><div id="attachment_3557" style="width: 149px" class="wp-caption aligncenter"><a href="https://geeorgey.com/wp-content/uploads/mobileSF1.jpg"><img aria-describedby="caption-attachment-3557" data-attachment-id="3557" data-permalink="https://geeorgey.com/archives/3555/mobilesf1" data-orig-file="https://geeorgey.com/wp-content/uploads/mobileSF1.jpg" data-orig-size="1125,2436" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="mobileSF1" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/mobileSF1-139x300.jpg" data-large-file="https://geeorgey.com/wp-content/uploads/mobileSF1-473x1024.jpg" loading="lazy" class="size-medium wp-image-3557" src="https://geeorgey.com/wp-content/uploads/mobileSF1-139x300.jpg" alt="" width="139" height="300" srcset="https://geeorgey.com/wp-content/uploads/mobileSF1-139x300.jpg 139w, https://geeorgey.com/wp-content/uploads/mobileSF1-768x1663.jpg 768w, https://geeorgey.com/wp-content/uploads/mobileSF1-473x1024.jpg 473w, https://geeorgey.com/wp-content/uploads/mobileSF1.jpg 1125w" sizes="(max-width: 139px) 100vw, 139px" /></a><p id="caption-attachment-3557" class="wp-caption-text">モバイルアプリにも同じコンポーネントを配置する</p></div></p>
<p>そう、再利用が簡単ですね。</p>
<h2>そうはいってもLightning Componentを開発したい</h2>
<p>先程、別に凝った開発をしなくてもレポートやビューのリストを表示することは出来ますとは書いたのですが、それだとやっぱり少し足りない。</p>
<p>例えば、リバネスでは情報の蓄積を大事にしています(報告・連絡・相談）ではなく、情報は蓄積・開示を主眼において、必要な人が情報を取りに行くようにしています。</p>
<p>これまではGoogleカレンダーからSalesforceに同期した予定(Eventオブジェクトに同期)に、営業報告を編集保存するとSlackに流れるというフローになっていて、そこは変わらないのですが、Lightning Componentで営業報告が必要なEventのリストを出すようにしてみたところ、ワンタップでアクセスが可能になります。</p>
<p>当然、全部終わってる人には営業報告が必要なデータリストは表示したくありませんので、なくなればその領域は消去します。</p>
<p>ビューのリストをコンポーネントとして表示する場合は、消す事が出来ません。イマイチな感じがします。</p>
<p>データが無ければこうしたい。データがあったらこうしたいという諸条件は色々なレコードについて回るでしょう。それをちょっとした開発で組み込む事が出来ます。</p>
<h2>現在までの実装状況</h2>
<h3><i class="fa fa-check-circle"></i><span>先程も書きましたが営業報告用のEventリスト</span></h3>
<p>これで営業報告の蓄積率が上がると良いなと期待しています</p>
<h3><i class="fa fa-check-circle"></i><span>自分が持っている商談リスト</span></h3>
<p>レポートで持ってたりもするのですが、こちらも開発してみました。</p>
<p>商談がなければ「提案に行こうぜ」と促したり</p>
<p>商談初期・商談確度高・契約済み請求前・請求済み、みたいな感じのパイプライン設定がしてあるので、それぞれの商談をどの程度持っているのかを見せる事もできます。</p>
<p>バランスが悪ければアラートを出すようにも当然できます(そこまでやってませんが)</p>
<h3><i class="fa fa-check-circle"></i><span>事業計画の達成度・毎週の進捗グラフ</span></h3>
<p>これもアプリ開いて一発で把握できれば良いですよね。</p>
<p>コンポーネント内で自分の所属部門を割り出し、そこに関する情報を表示するように設定しています。</p>
<h2>個人にフィーチャーしたダッシュボード</h2>
<p>Lightning Componentを使うことで、全員が同じ情報を見るのではなく、各個人が必要なものを選んで設置ができるようになります。</p>
<p>コンポーネントも色々なものを用意しておいて、自分でページ設定変えてくれっていうことも可能でしょう。</p>
<p>一応組織のデフォルト設定というものは展開しますが、それ以上のことも出来るようになるはずです。</p>
<p>コンポーネント内で、個々人のロールによって見せるデータを変化させることも可能です。</p>
<p>今後は、そんな感じで個々人が必要なものが手元に届くようになっていくのかなと感じましたというお話でした。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3555/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3555</post-id>	</item>
		<item>
		<title>Dreamforce18に行ってきました #DF18</title>
		<link>https://geeorgey.com/archives/3546</link>
					<comments>https://geeorgey.com/archives/3546#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 03 Oct 2018 02:41:18 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3546</guid>

					<description><![CDATA[昨年の記録はこちら 【dreamforce初参加】2017行ってきました #DF ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>昨年の記録はこちら</p>
<blockquote class="wp-embedded-content" data-secret="WEK76OW7QM"><p><a href="https://geeorgey.com/archives/3490">【dreamforce初参加】2017行ってきました #DF17</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" src="https://geeorgey.com/archives/3490/embed#?secret=WEK76OW7QM" data-secret="WEK76OW7QM" width="600" height="338" title="&#8220;【dreamforce初参加】2017行ってきました #DF17&#8221; &#8212; ゲオログ by リバネスCIO 吉田丈治 @geeorgey" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<h2>9月末のサンフランシスコの気候はどうなんだ？</h2>
<p>2018年は、昨年の自分の記録を見て服装を選んだつもりが結構寒かったです。<br />
長袖シャツ＆薄手のジャケットという格好だと少し冷えるかなという感じでした。<br />
日向と日陰の寒暖差が凄いので寒がりな人は気をつけましょう。夜は羽織るものがあったほうが良いですね。</p>
<h2>どうやって参加したか</h2>
<p>昨年はパスだけオンライン登録して、フライトと宿は別でとったのですが、これがかなり厳しかったので今年はJTBのツアーに申し込んでしまいました。(自分で取ってる暇もないし）</p>
<p>ホテルはPARC 55と、会場から徒歩5分程度の場所で非常に良かったです。近場にいると、夜の予定が入っていても歩いていけますし、ゆっくり眠れてセッションへも身が入るし良いですね。dreamforce期間中はホテルが高騰しますので、自分で予約する場合はお早めに。</p>
<p><iframe style="border: 0;" src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3153.2225344754934!2d-122.41124958468205!3d37.78482427975763!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x808580858a853597%3A0xf36fa59e8a02cca4!2sParc+55+San+Francisco+-+a+Hilton+Hotel!5e0!3m2!1sja!2sjp!4v1538532639586" width="600" height="450" frameborder="0" allowfullscreen="allowfullscreen"></iframe></p>
<h2>今年失敗したこと：シューズの選択</h2>
<p>昨年よりも会場が広くなっていた気がします。ウォーキングシューズとはいえ革靴で行ってしまったのですが、足が疲れますね。<br />
割とセッションからセッションへと渡り歩いていく感じなのですが、今歩いた距離見てみたら</p>
<p>Day1：11.6km<br />
Day2：16.2km(追加の5kmはdreamfesの会場に行ったからですね)<br />
Day3：11km<br />
Day4：11.1km(dreamforceタワーツアーに参加してました)</p>
<p>という感じで10km超えが続きました。ガッツリ会場内を散策する人は履物に気をつけましょう。</p>
<h2>反省点：Day1の夜はブッキングしまくり</h2>
<p>行く前は、Googleカレンダー上で予定を入れていっていたのですが、タイムゾーンを変更してきちんと処理をし始めたのが遅すぎてブッキングしまくりました。</p>
<p>Japan Night<br />
Heroku Night<br />
開発者パーティー</p>
<p>参加表明したものでも３つもあり、結局開発者パーティー行けなかったのが悔やまれます。行きたかった…</p>
<p>ということで、初日の夜はいろんな場所でパーティーが開催されていると思いますので、参加しましょう。</p>
<p>パーティーの見つけ方は、担当営業の方に聞くか、TwitterでdreamforceとかDF18とかで検索すると出てきますのでチェックです。情報は自分で取りに行きましょう。これだけの規模だとパーフェクトなサポートは期待できませんので(笑</p>
<p>最終的にはHeroku Nightの前半だけ顔だしてJapan Night会場へ駆け込みました。Japan Night短めだったのでその後Heroku Nightに戻ろうかとも思ったのですが、時差ボケで眠く…て寝てしまいましたね。</p>
<h2>モバイルの言語を英語にしておきましょう</h2>
<p>SalesforceのEventアプリですが、言語設定がアプリ内にありません。端末の設定を英語にしておきましょう。<br />
画面を見せながら、これどこだ？とか、予約のステータス見せろって言われた時にパッと見せて理解してもらうとか、そういうことがままありますので。</p>
<h2>サンフランシスコの通信環境をどうするか問題</h2>
<p>筆者はiPhone XのSIMロック無し端末を使っているので、事前に日本で現地で使えるSIMを購入して持っていってます。業務でイモトのWi-Fi使ったこともあるのですが、別端末でWi-Fi接続するのも面倒ですし、可能であればSIM買って持っていくのを推奨。Wi-Fi端末が電源切れるとか面倒ですし。</p>
<p>今年は昨年とは違うSIMを試してみました。昨年の記録はこちら</p>
<blockquote class="wp-embedded-content" data-secret="GdcguyWu8s"><p><a href="https://geeorgey.com/archives/3492">サンフランシスコ訪問時にZip SIMを使ったときのまとめ</a></p></blockquote>
<p><iframe class="wp-embedded-content" sandbox="allow-scripts" security="restricted" src="https://geeorgey.com/archives/3492/embed#?secret=GdcguyWu8s" data-secret="GdcguyWu8s" width="600" height="338" title="&#8220;サンフランシスコ訪問時にZip SIMを使ったときのまとめ&#8221; &#8212; ゲオログ by リバネスCIO 吉田丈治 @geeorgey" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>今年使ったのはMOST SIM</p>
<p><iframe style="width: 120px; height: 240px;" src="//rcm-fe.amazon-adsystem.com/e/cm?lt1=_blank&amp;bc1=000000&amp;IS2=1&amp;bg1=FFFFFF&amp;fc1=000000&amp;lc1=0000FF&amp;t=croudsorcing-22&amp;language=ja_JP&amp;o=9&amp;p=8&amp;l=as4&amp;m=amazon&amp;f=ifr&amp;ref=as_ss_li_til&amp;asins=B077HT3N2T&amp;linkId=8145e9401d272bf484808973f1de6c84" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe></p>
<p>最大7日間通信し放題っていうプラン。昨年のZip SIMは通信量制限があって、途中で一度追加しているのですが、それが面倒だったので使い放題を選択。</p>
<p>インフラはT-mobileを使っている模様。電波が入っている所では困りませんでした。(ホテルの電波が弱くてイマイチだなーとは思いましたが)</p>
<h3><i class="fa fa-check-circle"></i><span>国内でアクティベーションして出発しましょう</span></h3>
<p>MOST SIMが届いたら封を開け、アクティベーションを行います。出発の12時間前にはやったほうが良いと思います。というかもっと前のほうが良いです。</p>
<p>アクティベーション時に、利用開始日と何日間使うかを聞かれますので、設定します。設定すると電話番号がメールで届くという形。</p>
<p>実は、フライト当日の朝にやったので、国内にいるうちにこのメールが届くかヒヤヒヤしました。前日にはやろうね！</p>
<p>加えて、アメリカにいるのが５日間ということで、５日間使うって設定してしまったのですが、ここはフルの７日間に設定しましょう。今回帰国日にちょうど台風がぶちあたっていたため、あそこで帰れなかったら僕は電波難民になっていました。</p>
<h3><i class="fa fa-check-circle"></i><span>使い方</span></h3>
<p>飛行機が飛び立ったら、国内のSIMを抜き、MOST SIMに差し替えるだけ。<br />
アメリカに着陸したら電源を入れて通信が出来るか確認してみてください。なんと簡単な！！</p>
<h2>今年もソロ参加</h2>
<p>昨年に続きソロ参加が続いていますが身軽で良いですよ。セールスフォースの方々も割とソロで転々としているみたいです。お客様にべったりアテンドされている人ももちろんいますが。</p>
<p>Twitter見てたらTrailblaizerな皆さんがslack立ち上げてるのを見かけたのでそちらに参加もしてみました。皆さんグッズ集めまくってて凄い！</p>
<p>夜はパーティーに参加したり、担当営業さんを誘って飲みに行ったり、ユーザー会等で知人になった方々とご一緒したりで、寂しく過ごすこともありませんでした。知り合いが沢山いると良さそうですね。</p>
<h2>肝心のdreamforce18の中身はどうだったのか</h2>
<p><a href="https://www.mulesoft.com/partner/salesforce" target="_blank" rel="noopener">Mulesoft</a>と<a href="https://www.salesforce.com/jp/blog/2018/09/dreamforce-report-vol2.html" target="_blank" rel="noopener">Customer360</a>が中心でしたね。</p>
<p>Salesforceも、コミュニティクラウドやらマーケティングクラウドやらコマースクラウドやらと、いろんなプラットフォームを立ち上げているのですが、そこに入ってくるターゲットはいずれも人間です。(IoTは端末ですが)</p>
<p>一人の人間がいろんなインフラを使っているのを一元管理し、今までどんなことをやってきたのかを視覚化(それこそカスタマージャーニーそのものですね)しちゃいましょうというものでした。</p>
<p>話を聞いていて、え？出来てなかったの！？って思ったのですが(笑)、Salesforceは買収してプラットフォーム拡張してるので、仕方のない部分ですね。</p>
<p>とはいえ、dreamforce前日にこんなニュースがあがってきたのを見ていたのですが、みんなそこに困ってるのだということが明らかになったなと感じています。</p>
<p><a href="https://japan.cnet.com/article/35126042/" target="_blank" rel="noopener">アドビ、マイクロソフト、SAPがデータの統合分析で提携</a></p>
<p>Salesforceは自分たちの持つツール内でしっかり連携出来る仕組みを確立しました。この発表は3社横断ということも有り、結構難しいよねそれは…という肌感です。</p>
<p>弊社でも実はこの問題は認識していて、結局この人って何を利用してもらったっけ？っていうのは、全部一元管理出来てないんですよね。リバネスではherokuつかってつなぎこむ方針で決めたのですが、その方針は間違ってないよなと確信しました。</p>
<p>その他に気になったのは昨年に引き続きIoT(実用化に耐えうる仕様にアプデされてる模様)とhealth cloud(ユーザに関わるウェアラブルデバイスのデータを一元管理してました)ですね。Mulesoftに実装されているコネクタの種類の多さも凄かったなぁ(競合の皆さん大変だ)。<br />
QuipにSlideが実装されてましたが、これはもう少しアップデートが必要という感じですね。頑張ってほしい！</p>
<p>昨年発表されていたmyTrailheadは2019初旬にリリースみたいです。はよはよはよはよ！これは期待。</p>
<p>そんなわけで、DF18でも未来を見せてもらいました。どんどん実装していくぜー！と気合十分でございます。</p>
<h2>技術やさんにもおすすめ</h2>
<p>MosconeWestのTrailblazer広場にはDeveloperForestっていう技術やさん向けセッション＆ブースがあります。色んな小ネタだったり、このライブラリ使うと面白いこと出来るよ！みたいな話だったり、インテグレーションの効率化とかまぁマニアックなものがたくさんあります。</p>
<p>事前にセッション情報集めるのは数が多いので大変なのですが、気になるキーワードで検索してセッションにスターつけとくだけで、体験は変わると思いますよ。</p>
<h3><i class="fa fa-check-circle"></i><span>mini hackがライトニングに移行してた</span></h3>
<p>去年はそうでもなかったような気がするのですが…</p>
<p>今年はmini hackの内容がライトニングコンポーネントのが多かったですね。本格的に脳内を移行しないとツラいチャレンジが多かった気がします。僕は一つだけクリアしておきました。</p>
<h2>カスタマーサクセスを実現するというのはどういうことか</h2>
<p>Salesforceを使い始めると「カスタマーサクセス」というキーワードが耳に入ってきます。門外漢な僕からしたらなにそれ！？という感じだったのですが、カスタマーサクセスとはツールの定着化みたいな部分だけではないというのが面白かったですね。</p>
<p>success cloudを扱っているブースでは、効果的なプレゼンテーションに必要なことはなにか？を教える＆実際に作って見るワークショップなんかもやっていたり。</p>
<p>ビジネスそのものを伸ばすツールの提供という部分にも踏み込んでいる点は、さすがの巨大イベントだなと。</p>
<p>マインドフルネスなんかも好きみたいなので、坊さんとお話できる場所なんかも確保されていたりして面白い感覚だなって思いました。</p>
<h2>dreamforce18の写真</h2>
<p><a href="https://photos.app.goo.gl/3ZamSNsjE3xCYpDe9" target="_blank" rel="noopener">こちらにまとめてありますのでよろしければ御覧ください</a></p>
<p>実は、DAY4に新しいSalesforceタワーツアーにも行かせていただきました。素晴らしい就業環境だったなぁ。目指すべきものがありました。<br />
<iframe style="border: none; overflow: hidden;" src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FGeorgeYoshida%2Fposts%2F10217604105916476&amp;width=500" width="500" height="757" frameborder="0" scrolling="no"></iframe></p>
<p><iframe style="border: none; overflow: hidden;" src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FGeorgeYoshida%2Fposts%2F10217604044434939&amp;width=500" width="500" height="662" frameborder="0" scrolling="no"></iframe></p>
<p><iframe style="border: none; overflow: hidden;" src="https://www.facebook.com/plugins/post.php?href=https%3A%2F%2Fwww.facebook.com%2FGeorgeYoshida%2Fposts%2F10217602019224310&amp;width=500" width="500" height="458" frameborder="0" scrolling="no"></iframe></p>
<h2>市内を散策してみましょう</h2>
<p>余談です。</p>
<p>サンフランシスコ市内には、FordのgoBikeというレンタル自転車サービスがいたるところに配置されています。これ使うと、散策しやすくなるので良いですよ！</p>
<p>注意点は、サドルの高さに気をつけましょうということですね(笑</p>
<blockquote class="twitter-tweet" data-lang="ja">
<p dir="ltr" lang="ja">時間あるしチャリ乗ろう！と思い立って走ってきたのですが、山の中腹で体力の限界を感じております、、、 <a href="https://t.co/g5hnA0w1Ls">pic.twitter.com/g5hnA0w1Ls</a></p>
<p>— 吉田丈治 リバネスCIO (@geeorgey) <a href="https://twitter.com/geeorgey/status/1046100960731439104?ref_src=twsrc%5Etfw">2018年9月29日</a></p></blockquote>
<blockquote class="twitter-tweet" data-lang="ja">
<p dir="ltr" lang="ja">電動アシストチャリもあったんかーいの顔してる（激疲 <a href="https://t.co/cJIgElAqNd">pic.twitter.com/cJIgElAqNd</a></p>
<p>— 吉田丈治 リバネスCIO (@geeorgey) <a href="https://twitter.com/geeorgey/status/1046109053171183620?ref_src=twsrc%5Etfw">2018年9月29日</a></p></blockquote>
<p><script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script></p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3546/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3546</post-id>	</item>
		<item>
		<title>KUSANAGIのphp7へのエクステンションの追加方法</title>
		<link>https://geeorgey.com/archives/3538</link>
					<comments>https://geeorgey.com/archives/3538#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Wed, 12 Sep 2018 06:55:38 +0000</pubDate>
				<category><![CDATA[未分類]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3538</guid>

					<description><![CDATA[KUSANAGIを使ってからそれなりに経つのですが、わからないことが多くて試行錯 ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>KUSANAGIを使ってからそれなりに経つのですが、わからないことが多くて試行錯誤の日々です。</p>
<p>今回は、php-soapを入れたかったのですがよくわからず。というか、KUSANAGIの理解してないっぷりが露呈する結果となりました。</p>
<p>KUSANAGIでは、php-fpm環境とphp7-fpm環境が選べるのですが、今何を使っているのかを調べるには</p>
<p>$ kusanagi status</p>
<p>と打てばわかります。</p>
<p>[code]# kusanagi status<br />
Profile: *******<br />
FQDN: *******<br />
Type: WordPress<br />
KUSANAGI Version 8.4.0-3<br />
sakura</p>
<p>*** (active) nginx ***<br />
● nginx.service &#8211; The NGINX HTTP and reverse proxy server<br />
   Loaded: loaded (/usr/lib/systemd/system/nginx.service; enabled; vendor preset: disabled)<br />
   Active: active (running) since 水 2018-09-12 15:38:40 JST; 12min ago</p>
<p>*** (active) php7-fpm ***<br />
● php7-fpm.service &#8211; The PHP FastCGI Process Manager<br />
   Loaded: loaded (/usr/lib/systemd/system/php7-fpm.service; enabled; vendor preset: disabled)<br />
   Active: active (running) since 水 2018-09-12 15:38:40 JST; 12min ago</p>
<p>*** (active) MariaDB ***<br />
● mysql.service &#8211; LSB: start and stop MariaDB<br />
   Loaded: loaded (/etc/rc.d/init.d/mysql; bad; vendor preset: disabled)<br />
   Active: active (exited) since 水 2017-11-01 09:59:17 JST; 10 months 10 days ago</p>
<p>*** ruby ***<br />
KUSANAGI Ruby is not installed yet</p>
<p>*** add-on ***</p>
<p>*** Cache Status ***<br />
bcache off<br />
fcache off</p>
<p>*** WAF ***<br />
off<br />
[/code]</p>
<p>php7を使ってるとこんな感じになります。</p>
<p>PHP環境の変更は</p>
<p>$ kusanagi php7<br />
とやるとphp-fpm(PHP7)へ</p>
<p>$ kusanagi php-fpm<br />
とやるとphp-fpm(PHP5.6)へ変更されます</p>
<p>インストール済み拡張モジュールの確認方法<br />
PHP7の場合は<br />
$ php7 -m<br />
php-fpmの場合は<br />
$ php-fpm -m</p>
<p>でリストが表示されます。</p>
<p>KUSANAGI自体のアップデートは</p>
<p>$ yum update</p>
<p>現在インストールされているパッケージのリストを取得するには</p>
<p>$ rpm -qa | grep php</p>
<p>現在使ってるPHPのバージョンを調べたいなと思ったときに</p>
<p>$ php -v</p>
<p>とやりがちなのですが、これだとちゃんとわかりません。ｐｈｐ７の場合は</p>
<p>$ php7 -v</p>
<p>とする必要があります。</p>
<p>では、そのphp7にエクステンションの追加を行うにはどうしたらよいのでしょう。</p>
<p>$ yum install ****</p>
<p>では駄目でした。</p>
<p>参考にしたのはこちら<br />
<a href="https://jyo-to.okinawa/20180328/1687/" rel="noopener" target="_blank">KUSANAGIのPHP7.2環境にphp-intlをインストール</a></p>
<p>php-soapをインストールする場合はこちらのコマンドで行けました<br />
$ yum &#8211;enablerepo=remi,remi-php7.2 install php72-php-soap</p>
<p>php-fpm(PHP5.6)環境へのインストールの場合は<br />
$ yum &#8211;enablerepo=remi,remi-php56 install php-soap</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3538/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3538</post-id>	</item>
		<item>
		<title>VisualforceでExcelで開けるファイル(複数シート)を作成してダウンロードする方法</title>
		<link>https://geeorgey.com/archives/3535</link>
					<comments>https://geeorgey.com/archives/3535#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Fri, 25 May 2018 05:19:20 +0000</pubDate>
				<category><![CDATA[Salesforce]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3535</guid>

					<description><![CDATA[指示書を作成する際などにExcelで共有しないといけないというシチュエーションは ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>指示書を作成する際などにExcelで共有しないといけないというシチュエーションはそれなりにあると思います。</p>
<p>Salesforceには構造化されているデータが有るが、例えばリードと取引先担当者に散っていて、一つのレポートでは出力出来なかったり、一つのレポートでデータリストは出力できるものの、それを適宜フィルタ処理をして別々のシートにリストを記載したり、はたまたそのデータリストを集計するテーブルを別シートに設けたり。</p>
<p>処理が複雑になればなるほどミスが発生しやすくなるので、直接Excelファイルを出力したいと思うことはあるのではないでしょうか。</p>
<p>こんな方法があるとは知らずに手作業していたのですが、感動しました。おすすめです。</p>
<h2>OPEN XML形式でファイルを出力すればExcelで読み込むことが出来る</h2>
<p class="entry-header">参照：<a href="http://blog.flect.co.jp/salesforce/2013/06/visualforcecsve-93b8.html" target="_blank" rel="noopener">VisualforceでCSVファイルとExcelファイルを出力するには</a></p>
<h3><i class="fa fa-check-circle"></i><span>Visualforce page</span></h3>
<p>[code]<br />
&lt;apex:page controller=&quot;使用するコントローラー名&quot; showHeader=&quot;false&quot; sidebar=&quot;false&quot; readOnly=&quot;true&quot; contentType=&quot;text/xml#ファイル名.xml;charset=UTF-8&quot;&gt;<br />
&lt;apex:outputText escape=&quot;true&quot; value=&quot;{!xmlVer}&quot; /&gt;<br />
&lt;apex:outputText escape=&quot;true&quot; value=&quot;{!xmlApp}&quot; /&gt;<br />
&lt;Workbook xmlns=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot;<br />
 xmlns:o=&quot;urn:schemas-microsoft-com:office:office&quot;<br />
 xmlns:x=&quot;urn:schemas-microsoft-com:office:excel&quot;<br />
 xmlns:ss=&quot;urn:schemas-microsoft-com:office:spreadsheet&quot;<br />
 xmlns:html=&quot;http://www.w3.org/TR/REC-html40&quot;&gt;<br />
&lt;Worksheet ss:Name=&quot;シート名&quot;&gt;&lt;!&#8211; ここからシート内部のデータを書く &#8211;&gt;<br />
  &lt;Table&gt;<br />
	&lt;Column ss:Index=&quot;1&quot; ss:AutoFitWidth=&quot;0&quot; ss:Width=&quot;110&quot;/&gt;<br />
   &lt;Row ss:AutoFitHeight=&quot;0&quot;&gt;<br />
	&lt;Cell ss:MergeAcross = &quot;6&quot;&gt;&lt;Data ss:Type=&quot;String&quot;&gt;7個のセルを結合する&lt;/Data&gt;&lt;/Cell&gt;&lt;!&#8211; ss:MergeAcrossは、そのセルと右側いくつ分をマージするか &#8211;&gt;<br />
	&lt;Cell&gt;&lt;Data ss:Type=&quot;String&quot;&gt;テキストの場合はtypeをStringに&lt;/Data&gt;&lt;/Cell&gt;<br />
	&lt;Cell&gt;&lt;Data ss:Type=&quot;Number&quot;&gt;数字の場合はtypeをNumberに&lt;/Data&gt;&lt;/Cell&gt;<br />
   &lt;/Row&gt;<br />
  &lt;/Table&gt;<br />
&lt;/Worksheet&gt;<br />
&lt;Worksheet ss:Name=&quot;複数のシートを出力する場合はここに書き連ねる&quot;&gt;&lt;!&#8211; ここからシート内部のデータを書く &#8211;&gt;<br />
&lt;/Worksheet&gt;</p>
<p>&lt;/Workbook&gt;<br />
&lt;/apex:page&gt;<br />
[/code]<br />
Workbook > Worksheet > Table > Row > Cell<br />
という階層構造になってます。</p>
<h3><i class="fa fa-check-circle"></i><span>apex</span></h3>
<p>[code]<br />
public with sharing class 使用するコントローラー名 {<br />
    public String getXmlVer() {<br />
		return &#8216;&lt;?xml version=&quot;1.0&quot;?&gt;&#8217; + &#8216;\r\n&#8217;;<br />
    }</p>
<p>    public String getXmlApp() {<br />
		return &#8216;&lt;?mso-application progid=&quot;Excel.Sheet&quot;?&gt;&#8217; + &#8216;\r\n&#8217;;<br />
    }<br />
}<br />
[/code]</p>
<h2>ファイルのダウンロード</h2>
<p>ファイルのダウンロードは<br />
https://yourNameSpace.lightning.force.com/apex/yourVisualforcePageName<br />
にアクセスすれば、xmlファイルがダウンロードされるので、それをExcelで開けばOKです。</p>
<h2>Excelでファイルが開けない場合</h2>
<p>恐らくシンタックスエラーが出てると思いますので、xmlファイルをテキストエディタ等で開いて、適切な形に直しましょう。</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3535/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3535</post-id>	</item>
		<item>
		<title>Google Chartsを使って層別散布図を書くには</title>
		<link>https://geeorgey.com/archives/3521</link>
					<comments>https://geeorgey.com/archives/3521#respond</comments>
		
		<dc:creator><![CDATA[吉田 丈治]]></dc:creator>
		<pubDate>Mon, 12 Mar 2018 14:38:13 +0000</pubDate>
				<category><![CDATA[Google]]></category>
		<guid isPermaLink="false">https://geeorgey.com/?p=3521</guid>

					<description><![CDATA[散布図を書こうと思う。 データはグループ化されており、それぞれを色分けした散布図 ... <p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></description>
										<content:encoded><![CDATA[<p>散布図を書こうと思う。</p>
<p>データはグループ化されており、それぞれを色分けした散布図が書きたい。でもよくわからずにハマったので書く。</p>
<p><a href="https://developers.google.com/chart/interactive/docs/gallery/scatterchart" target="_blank" rel="noopener">サンプルはここにあるんです</a></p>
<p><img data-attachment-id="3522" data-permalink="https://geeorgey.com/archives/3521/scatterplot" data-orig-file="https://geeorgey.com/wp-content/uploads/scatterplot.png" data-orig-size="1664,1036" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="scatterplot" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/scatterplot-300x187.png" data-large-file="https://geeorgey.com/wp-content/uploads/scatterplot-620x386.png" loading="lazy" class="aligncenter size-large wp-image-3522" src="https://geeorgey.com/wp-content/uploads/scatterplot-620x386.png" alt="" width="620" height="386" srcset="https://geeorgey.com/wp-content/uploads/scatterplot-620x386.png 620w, https://geeorgey.com/wp-content/uploads/scatterplot-300x187.png 300w, https://geeorgey.com/wp-content/uploads/scatterplot-768x478.png 768w, https://geeorgey.com/wp-content/uploads/scatterplot.png 1664w" sizes="(max-width: 620px) 100vw, 620px" /></p>
<p>よくある散布図ですね。</p>
<p>これを青一色じゃなくて、グループごとに分けたいときあるじゃないですか。ないですか。あると思います</p>
<p>結論から言うとこういう散布図</p>
<p><img data-attachment-id="3523" data-permalink="https://geeorgey.com/archives/3521/layered" data-orig-file="https://geeorgey.com/wp-content/uploads/layered.png" data-orig-size="1438,1088" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="layered" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/layered-300x227.png" data-large-file="https://geeorgey.com/wp-content/uploads/layered-620x469.png" loading="lazy" class="aligncenter size-large wp-image-3523" src="https://geeorgey.com/wp-content/uploads/layered-620x469.png" alt="" width="620" height="469" srcset="https://geeorgey.com/wp-content/uploads/layered-620x469.png 620w, https://geeorgey.com/wp-content/uploads/layered-300x227.png 300w, https://geeorgey.com/wp-content/uploads/layered-768x581.png 768w, https://geeorgey.com/wp-content/uploads/layered.png 1438w" sizes="(max-width: 620px) 100vw, 620px" /></p>
<p>これを例に取ると、年次別のデータにグループ化しておいて、それを表示しましょうというもの。</p>
<p>しかし、サンプルには書いてないんですね。なんだよそれって。</p>
<h2>書き方</h2>
<p>[code]</p>
<p>function drawGradeM() {<br />
var button = document.getElementById(&#8216;change-chart&#8217;);<br />
var chartDiv = document.getElementById(&#8216;chart_div&#8217;);</p>
<p>var dataGradeM = new google.visualization.DataTable();<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;横軸数値&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;1年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;2年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;3年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;4年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;5年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;6年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;7年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;8年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8216;9年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8217;10年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8217;11年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8217;12年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8217;13年次&#8217;);<br />
dataGradeM.addColumn(&#8216;number&#8217;, &#8217;14年次&#8217;);</p>
<p>dataGradeM.addRows([<br />
ここにデータセットを記入する*後述<br />
]);</p>
<p>var dataGradeMOptions = {<br />
title: &#8216;グラフのタイトル&#8217;,<br />
hAxis: {title: &#8216;横軸名&#8217;},<br />
vAxis: {title: &#8216;縦軸名&#8217;}<br />
};</p>
<p>var chart = new google.visualization.ScatterChart(document.getElementById(&#8216;chart_div&#8217;));<br />
chart.draw(dataGradeM, dataGradeMOptions);</p>
<p>}</p>
<p>[/code]</p>
<p>こんな感じで書きます。サンプルとそれほど変わらないと思う。</p>
<p>HTMLには</p>
<p>[code]&lt;div id=&quot;chart_div&quot; style=&quot;width: 900px; height: 800px;&quot;&gt;&lt;/div&gt;[/code]</p>
<p>みたいな感じでid指定しておけば、そこに表示されます。</p>
<h2>肝心なデータセットの書き方どうするのか</h2>
<p>散布図をレイヤーごとに分けて表示するには、データセットの書き方はこんな感じになります</p>
<p><img data-attachment-id="3524" data-permalink="https://geeorgey.com/archives/3521/series" data-orig-file="https://geeorgey.com/wp-content/uploads/series.png" data-orig-size="1404,566" data-comments-opened="1" data-image-meta="{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}" data-image-title="series" data-image-description="" data-medium-file="https://geeorgey.com/wp-content/uploads/series-300x121.png" data-large-file="https://geeorgey.com/wp-content/uploads/series-620x250.png" loading="lazy" class="aligncenter size-large wp-image-3524" src="https://geeorgey.com/wp-content/uploads/series-620x250.png" alt="" width="620" height="250" srcset="https://geeorgey.com/wp-content/uploads/series-620x250.png 620w, https://geeorgey.com/wp-content/uploads/series-300x121.png 300w, https://geeorgey.com/wp-content/uploads/series-768x310.png 768w, https://geeorgey.com/wp-content/uploads/series.png 1404w" sizes="(max-width: 620px) 100vw, 620px" /></p>
<p>つまり、</p>
<p>縦軸データ,1年次,2年次,3年次・・・・</p>
<p>というデータセットにする。</p>
<p>最大年次を6年として、1年次に5ポイント取っていて、横軸が3の場合は</p>
<p>[3,5,0,0,0,0,0]</p>
<p>2年次に10ポイント取っていて、横軸が21の場合は</p>
<p>[21,0,10,0,0,0,0]</p>
<p>という感じです。グループ別にカラムが一つ増えるイメージですね。</p>
<p>CSVで書くと</p>
<p>横軸データ,1年次ポイント,2年次ポイント,3年次ポイント,4年次ポイント,5年次ポイント,6年次ポイント</p>
<p>という形式でカラムを増やしていく必要があります。</p>
<h2>結論</h2>
<p>書けてしまえば簡単ですね(白目</p>
<p>Copyright &copy; 2026 <a href="https://geeorgey.com">ゲオログ by リバネスCIO 吉田丈治 @geeorgey</a> All Rights Reserved.</p>]]></content:encoded>
					
					<wfw:commentRss>https://geeorgey.com/archives/3521/feed</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">3521</post-id>	</item>
	</channel>
</rss>
