Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save MashmatrixSupport/6f3ebced878dd266c441f63408b3a80d to your computer and use it in GitHub Desktop.
Save MashmatrixSupport/6f3ebced878dd266c441f63408b3a80d to your computer and use it in GitHub Desktop.
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>
@MashmatrixSupport
Copy link
Author

MashmatrixSupport commented Mar 16, 2017

  1. "詳細レコードレイアウトへの埋込用VFページ.xml" を参考に、Sheet画面をレコード詳細ページへ埋め込むためのVisualforceページを作成します。
  • standardController 属性の値は埋め込み対象となるレコードのオブジェクトのAPI参照名に変更する必要があります。
  • bookIdおよびsheetIdの値は、表示するブックおよびシートのIDを指定します。
  1. 該当オブジェクトのレイアウトを編集し、作成したVisualforceページをドラッグ&ドロップしてレイアウト内の任意のセクションに追加します。埋め込んだ領域の高さは固定となるため、プロパティ設定から適切に高さを設定して下さい。

__account_layout___salesforce_-_enterprise_edition

  1. 埋め込み表示するシートの中では、現在表示しているレコードIDの値を関連レコードのIDとしてIDフィルタ内で参照できます。これにより、現在表示しているレコードに関連しているレコードをフィルタしてリストすることも可能です。詳しくはユーザガイドをご覧ください。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment