Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
apex で管理パッケージのプレフィックス名を取得する方法はありますか?
SOSL クエリがありますが、アプリは開発者組織と管理パッケージにあります。パッケージ名を取得する方法があれば、ハードコーディングする必要がないので、すばらしいでしょう。
ありがとう。
UserInfo.isCurrentUserLicensed('nsPrefix') は、渡された名前空間がインストール済みパッケージ (または開発中の管理パッケージ) の有効な名前空間でない場合、TypeException をスローします。これは、メタデータ API なしで得られる最も近いものだと思います。