LoginSignup
3
1

Apexを使ってメタデータAPIを操作する

Last updated at Posted at 2020-10-30

:cloud: Metadata API

はじめに

リストビューや選択リスト(連動選択リスト)を操作する場合にはメタデータAPIを使う必要がありますが、なかなか簡単にはできないです。
調べてみるとApexから操作するための方法が紹介されています。ただし英語で書かれていることと、少々古い記事が多いので実際に設定をしようと思うとたどり着けないように感じました。(英語環境のSalesforceを日常的に使っていると、どうにかたどり着けますが、日本語環境だと直訳しても設定場所を探すのに苦労します。)

ということで、時間があれば日本語に直して、かつ実際に設定して使ってみたいと思います。

目次

一番大元になる資料はこちらです。

実際の使い方のサンプルは、以下に記録しておきます。

技術資料

質問から...

Metadata API request failed: Cannot read properties of null (reading 'split').

I had tried the solution you suggested before as I mentioned to my question and didn't work.

In the end it seems there was also the need to uncheck the option 'Experimental: Deploy Retrieve' from VS Code settings. By doing so it works again.

メタデータを取得して、別の組織でメタデータを展開すれば可能です。

私もforce cliを使って実施したことはあります。

英語ですが解説があります。ANTと有償ツールが紹介されてます。

https://www.autorabit.com/blog/how-to-migrate-metadata-from-one-salesforce-organization-to-another/

ANTとVS Studioが提案されてますね。

https://trailhead.salesforce.com/trailblazer-community/feed/0D54V00007T437XSAR

image.png

image.png

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1