Loading
Nonprofit Cloud
目次
絞り込み条件を選択

          結果がありません
          結果がありません
          検索のヒントをいくつかご紹介します

          キーワードの入力ミスがないか確認する。
          より一般的な検索語を使用する。
          絞り込み条件を減らして、検索範囲を広げる。

          Salesforce ヘルプ全体を検索
          Nonprofit の Gift Entry Grid のカスタム Lightning Web コンポーネント

          Nonprofit の Gift Entry Grid のカスタム Lightning Web コンポーネント

          カスタムLightning Webコンポーネントがギフト エントリ グリッドとの間でデータを移動する方法について説明します。

          必要なエディション
          使用可能: Lightning Experience

          使用可能なエディション: Education Cloud を含む Enterprise Edition、Performance Edition、Unlimited Edition、Developer Edition

          使用可能なエディション: Enterprise Edition、Unlimited Edition、および Developer Edition (Nonprofit Cloud 付属)

          ギフトエントリグリッドからコンポーネントに送信されるプロパティ

          支援エントリグリッドは、セルコンポーネントの「 params 」プロパティーとモーダルの「 rowData 」プロパティーを使用して、行データをカスタム Lightning Web コンポーネントに渡します。

          必要なエディション
          使用可能: Lightning Experience

          使用可能なエディション: Education Cloud を含む Enterprise Edition、Performance Edition、Unlimited Edition、Developer Edition

          使用可能なエディション: Enterprise Edition、Unlimited Edition、および Developer Edition (Nonprofit Cloud 付属)

          プロパティ 説明
          params
          • [セルの編集] および [セルの表示] コンポーネントで使用できます。
          • ギフトエントリグリッド内の現在の行のプロパティと基盤となるグリッドサービスが含まれます。
          • params.data には、参照項目と選択リスト項目のオブジェクト表現に加えて GiftEntry オブジェクト項目に対応する項目値が含まれます。新しい行にまだ入力されていない項目は、データ収集に含まれません。
          • 行フィールド値は、params.data.{giftEntryfieldName} を使用して取得できます。
          rowData
          • 列モーダルと後処理モーダルで使用できます。
          • 参照項目と選択リスト項目のオブジェクト表現に加えて GiftEntry オブジェクト項目に対応する項目値が含まれます。新しい行にまだ入力されていない項目は rowData コレクションに含まれません。
          • rowData.{giftEntryfieldName} を使用して行フィールド値を取得します。
          • Post Processing Modal (後処理モーダル) の rowData には、Gift Entry ID (rowData.Id) や Gift Transaction ID (rowData.GiftTransactionId) など、生成されたレコードの ID も含まれます。

          ギフトエントリグリッドへのデータの送信

          列モーダルとセル編集コンポーネントでは、異なるメカニズムを使用してデータをギフトエントリグリッドに返します。

          必要なエディション
          使用可能: Lightning Experience

          使用可能なエディション: Education Cloud を含む Enterprise Edition、Performance Edition、Unlimited Edition、Developer Edition

          使用可能なエディション: Enterprise Edition、Unlimited Edition、および Developer Edition (Nonprofit Cloud 付属)

          列のモーダル

          列モーダルは、モーダルタイトル (テンプレートで定義) のほか、[続行] ボタンと [キャンセル] ボタンを含むラッパー Lightning Web コンポーネント内で表示されます。

          [続行] ボタンは、ユーザーがカスタムモーダルを閉じるためにクリックするボタンです。次の必須の公開関数がコールされます。

          関数 説明
          @api validate()

          次の 2 つのプロパティを持つオブジェクトを返します。

          • isValid: true または false。モーダルのコンテンツが入力規則に合格していることを示します。true の場合、getComponentValues() へのコールで項目値が取得され、モーダルが閉じます。
          • invalidFields: isValid が false の場合、関連付けられたエラーを含む項目 API 名の key:value セットが含まれます。この情報は、モーダル内でメッセージを表示するために使用されます。
          @api getComponentValues()

          行に適用するプロパティの key:value セットを返します。

          • { FieldApiName : value, … }
          • 各項目は GiftEntry オブジェクトに存在する項目を参照する必要があります。これらは保存時に行に保持されます。

          セル編集コンポーネント

          セル編集コンポーネントから支援エントリグリッドにデータを返す

          • ギフトエントリグリッドに戻るメッセージとしてオブジェクトを作成します。
          • イベントを lightning__giftEntryGridComponentAction メッセージ チャネルに公開します。

          メッセージ本文の内容は厳格です。次の例の構造に従います。

          // Build the "message" object to send back to 
          // Gift Entry Grid following the documented contract
          const message = {
          
              // Required properties (do not change the values below)
              action: "ColumnEdit",
              componentName: this.tagName,
              colId: this._params?.colDef?.colId,
          
              // 'details' is an optional property:
              // - include if there is data to write to the row 
              //   in Gift Entry
              details: {
          
                  // rowId and rowIndex must be included in details
                  rowId: this.params?.data?.id,           // Required
                  rowIndex: this.params?.data?.rowIndex,  // Required
          
                  // All GiftEntry fields to write to rowData
                  // and as object in a key:value collection.
                  // To clear the value of a field on the GiftEntry rowData
                  // object, return null instead of undefined
                  giftEntryFields : { key: value, ... },
          
                  // rowProperties is optional, but if passed can be
                  // referenced by other custom components. Data in this
                  // object are not persisted to the GiftEntry record.
                  rowProperties: { key : value, ... },
          
                  // Special Use: If your custom column component is 
                  // forcing a matched gift transaction, use these
                  // properties to send the matching transaction ID 
                  // and NAME back to grid for proper handling:
                  matchingGiftTransactionId: {giftTransactionId},
                  matchingGiftTransactionName: {giftTransactionName}
              }
          }
          
          メモ
          メモ 列コンポーネント (表示) またはセル表示コンポーネントからグリッドにプロパティは返されません。

          データを返す場合の考慮事項

          データをギフトエントリグリッドに戻すときは、選択リスト項目と参照項目について次のルールを考慮してください。

          必要なエディション
          使用可能: Lightning Experience

          使用可能なエディション: Education Cloud を含む Enterprise Edition、Performance Edition、Unlimited Edition、Developer Edition

          使用可能なエディション: Enterprise Edition、Unlimited Edition、および Developer Edition (Nonprofit Cloud 付属)

          選択リスト項目の考慮事項:

          • 選択リスト項目が単純な文字列として返される場合、表示ラベルと API 参照名が異なる場合、値は選択リストの API 参照名を表します。
          • 選択リストフィールドは、{ value: xx, displayValue: zz } の形式でオブジェクトとして返すこともできます。次に例を示します。
            { 
              giftType: 
                { value: “Organizational”, 
                  displayValue: “Organizativo/Doméstico” 
                }
            }

          参照項目の考慮事項:

          • ギフトエントリグリッドの列ではない参照項目は、応答オブジェクトでのみ単なる ID 文字列として返すことができます。例: {MyLookupFieldId__c: ‘xxx00000000’}
          • キャンペーンやアウトリーチソースコードなど、ギフトエントリグリッドの項目列である参照項目は、カスタム Lightning Web コンポーネントからオブジェクト形式で返され、グリッドで適切に表示されるようにする必要があります。次に例を示します。
            Campaign: {
               Id: {campaignId},
               Name: {campaignName}
            }
            
           
          読み込み中
          Salesforce Help | Article