Skip to content

Instantly share code, notes, and snippets.

View MashmatrixSupport's full-sized avatar

Mashmatrix Support MashmatrixSupport

View GitHub Profile
@MashmatrixSupport
MashmatrixSupport / JavascriptApiDemo.xml
Created May 24, 2019 07:53
JavascriptApiDemo.xml
<apex:page>
<apex:form>
<!-- Please replace the following bookId/sheetId attribute values to the values of from book/sheet setting dialog -->
<apex:pageBlock title="Accounts">
<msmxSheet:SheetView id="comp-01"
bookId="a002800001O6vOpAAJ"
sheetId="s1"
width="100%"
height="300px"
/>
@MashmatrixSupport
MashmatrixSupport / SheetEmbedPage.xml
Last active May 24, 2019 14:23
Sheet-Embeded Visualforce Page
<apex:page
standardController="Account"
showHeader="false"
>
<script>
var bookId = "a002800000iNFMLAA4";
var sheetId = "s1";
var url =
"{!URLFOR($Page.msmxSheet__MsmxSheetView)}" +
"?bookId=" + bookId + "&sheetId=" + sheetId;
@MashmatrixSupport
MashmatrixSupport / CustomActionController.cls
Last active January 22, 2019 14:18
カスタムアクション
public with sharing class CustomActionController {
public Account[] accounts { get; set; }
public CustomActionController() {
// 「URLを開く」アクションボタンの詳細設定で指定したパラメータに選択したレコードの値が渡される
String idParam = ApexPages.currentPage().getParameters().get('id');
if (idParam != null) {
// 「URLを開く」アクションボタンの詳細設定で"配列値のシリアライズ方法に「コンマ区切り」を選んでいる場合
String[] ids = idParam.split(',');
accounts = [SELECT Id, Name FROM Account WHERE Id IN :ids];
@MashmatrixSupport
MashmatrixSupport / QuotesAndQuoteItems.xml
Last active September 1, 2018 05:04
見積/見積明細(詳細ページ埋込 + 上下連動)
<!-- standardControllerには実際に埋め込むオブジェクトのAPI参照名(例:商談 => Opportunity)を入力する -->
<apex:page standardController="Opportunity">
<apex:form >
<!-- bookId/sheetIdに指定するブックID/シートIDはブックおよびシートの設定画面から取得したものに置き換える -->
<apex:pageBlock title="見積">
<msmxSheet:SheetView id="comp-01"
bookId="a000I00001eaVtQQAU"
sheetId="s1"
recordId="{!Id}"
width="100%"
@MashmatrixSupport
MashmatrixSupport / PortalDemo.xml
Last active July 23, 2018 03:47
上下シートの連動(取引先/商談)
<apex:page>
<apex:form>
<!-- bookId/sheetIdに指定するブックID/シートIDはブックおよびシートの設定画面から取得したものに置き換える -->
<apex:pageBlock title="取引先">
<msmxSheet:SheetView id="comp-01"
bookId="a002800001O6vOpAAJ"
sheetId="s1"
width="100%"
height="300px"
/>
@MashmatrixSupport
MashmatrixSupport / 詳細レコードレイアウトへの埋込用VFページ.xml
Last active March 16, 2017 02:16
Sheetのレコード詳細ページへの埋め込み
<apex:page standardController="CustomObject__c" showHeader="false">
<script>
var bookId = 'a01280000179IMaAAM';
var sheetId = 's1';
var recordId = '{!JSENCODE(id)}';
location.href = '/apex/msmxSheet__MsmxSheetView?id=' + recordId + '&bookId=' + bookId + '&sheetId=' + sheetId;
</script>
</apex:page>
<apex:page sidebar="false">
<msmxSheet:SheetView
width="100%" height="600px"
bookId="a0I1000000MjZFXEA3"
sheetId="s1"
/>
</apex:page>