サービスカタログでエクセルデータをインポートしてのREQと複数RITMの起票のやり方について

__ __216
Tera Contributor

サービスカタログは,一般的にオーダーフォームから注文後に1つのREQと1つのRITMが作成されますがこれを
,作業,内容を複数記入したエクセルデータをインポートして、1つのREQと複数の作業分のRITMが作成されるようにできればと思っております。具体的な作業内容は、パスワード変更を複数のサーバーに対して行う作業を1つの注文で実施するイメージです。

 

上記,カスタマイズ方法をご存じの方がいれば,ご教授いただければ幸いです。

 

宜しくお願いします。

1 件の受理された解決策

iwai
Giga Sage

処理方法を考えてみました。処理概要としてはリクエストアイテムのエクセルデータをインポートして、インポート処理内でリクエストに追加する形でカタログアイテムをオーダーします。

これらすべてを実際に作って説明用にデータも作って、それらすべての設定とScriptをここ公開するのはけっこう大変な作業の依頼となるかと思います。

  1. Excel添付ファイルを、RequestedItemからインポートのDataSourceにCopyする
    GlideSysAttachment
    copy(String sourceTable, String sourceID, String targetTable, String targetID)
    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server_legacy/GlideSysAttachmentGlobal...

  2. Excelファイルを読み込んでImportSetTableに格納する
    GlideImportSetLoader

  3. ImportSetTableにRequestRecordのSysIDを追加する

  4. インポートデータのTransformを実行する
    GlideImportSetRun
    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/no-namespace/GlideImportSetRunA...

    GlideImportSetTransformer
    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/no-namespace/GlideImportSetTran...

  5. Transform の onBefore ではRequestedItem Recordのinsertをさせない
    ignore = true;

  6. TransformのonAfter で RequestedItemを作成する

    GlideappCalculationHelper
    addItemToExistingRequest

    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server_legacy/GlideappCalcHelperAPI?na...

     

元の投稿で解決策を見る

Learn how to build configurable workspaces from scratch in ServiceNow in this informative session. Whether you're working with App Engine Studio or starting fresh, we provide essential steps and use cases for creating custom workspaces that meet your needs. #Servicenow #Workspaces #AppEngineStudio
2件の返信2

iwai
Giga Sage

処理方法を考えてみました。処理概要としてはリクエストアイテムのエクセルデータをインポートして、インポート処理内でリクエストに追加する形でカタログアイテムをオーダーします。

これらすべてを実際に作って説明用にデータも作って、それらすべての設定とScriptをここ公開するのはけっこう大変な作業の依頼となるかと思います。

  1. Excel添付ファイルを、RequestedItemからインポートのDataSourceにCopyする
    GlideSysAttachment
    copy(String sourceTable, String sourceID, String targetTable, String targetID)
    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server_legacy/GlideSysAttachmentGlobal...

  2. Excelファイルを読み込んでImportSetTableに格納する
    GlideImportSetLoader

  3. ImportSetTableにRequestRecordのSysIDを追加する

  4. インポートデータのTransformを実行する
    GlideImportSetRun
    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/no-namespace/GlideImportSetRunA...

    GlideImportSetTransformer
    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server/no-namespace/GlideImportSetTran...

  5. Transform の onBefore ではRequestedItem Recordのinsertをさせない
    ignore = true;

  6. TransformのonAfter で RequestedItemを作成する

    GlideappCalculationHelper
    addItemToExistingRequest

    https://developer.servicenow.com/dev.do#!/reference/api/tokyo/server_legacy/GlideappCalcHelperAPI?na...

     

Learn how to build configurable workspaces from scratch in ServiceNow in this informative session. Whether you're working with App Engine Studio or starting fresh, we provide essential steps and use cases for creating custom workspaces that meet your needs. #Servicenow #Workspaces #AppEngineStudio

__ __216
Tera Contributor

iwai様

 

本件,ご教授いただきましてありがとうございます。

上記,回答を踏まえて,改めて検討させていただきます。

 

また機会がありましたら,よろしくお願いいたします。