[Sitecore][Error]method through reflection is not allowed

検証環境:Sitecore 10.2.0
概要:
従来動作していたSPEでスクリプトをがエラーが発生しているというタスクが渡されました。これはその設定のメモ書きです。
エラーメッセージ:
Method through reflection is not allowed

発生場所:
スクリプトを完了後、ウィンドウをクローズする際にポップアップされます:

クイック解決策:
ローカールでとりあえずこのエアーを解決するなら、下記の設定を有効にすればよい。
ファイルパス:”\App_Config\Sitecore\CMS.Core\Sitecore.Reflection.Filtering.config”
設定:Sitecore.Reflection.Filtering.Disabled
ホワイトリストフィルタリングを無効にします。有効の場合メソッドはホワイトリストに登録されていない場合でも許可されます。このようなメソッドに対してワーニングがログにて記録されます。この設定が true か false かにかかわらず、forbiddenMethods のメソッドは許可されません。
初期値は無効です。

勧められた解決策:
Sitecore.Reflection.Filtering.Disabledの設定を変更せず、allowedMethodsにて許可するメソッドを追加。

許可するメソッドを追加:
まず、Okclickメソッドの情報を取集。
SPEをディコンパイルします:

OkClickメソッドを特定:

許可するメソッドへ追加:

結論:
このように、Method through reflection is not allowedのエラーに対して、必要なメソッドを追加していけばよい。ネットでこれに関して検索するところ、Sitecore セキュリティ情報 SC2023-003-587441 にて、sitecore.shell.Applications.Dialogs.Publish.PublishForm.StartPublisherも同じようなエラーがあり、同じ方法で許可するメソッドを追加すればよい。