0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

Salesforce 数式で動的に組織URLを作成する

Last updated at Posted at 2023-04-27

概要

  • いつも忘れてググるのでメモ
    • 自身の組織URLをハードコードしなくて良い
    • フロー内で作成したレコードURLを生成する場合にハードコードしなくて良い

lightning.force.com(組織側)の場合

  • 数式型の変数を作成して、下記を入力する
  • Origin名までを下記で取得できる (例: https://yourDomain.--c.vf.force.com)
LEFT({!$Api.Enterprise_Server_URL_260}, FIND('/services', {!$Api.Enterprise_Server_URL_260}))
  • 例えば、フロー側で Accountレコードを作って、Idを含む変数が acconutIdだった場合:
  • このURLで良いのか?と思うのですが、Idによって対象ページにリダイレクトされる
LEFT({!$Api.Enterprise_Server_URL_260}, FIND('/services', {!$Api.Enterprise_Server_URL_260})) & {!acconutId}

参考

Experience Cloudサイトの場合

  • 少しハードコードが必要になる
  • YourSiteのところにサイト名をセットし、ObjectNameObject.Idをセットする
SUBSTITUTE(
  LEFT($Api.Partner_Server_URL_260,FIND("/services", $Api.Partner_Server_URL_530)),
  'salesforce.com/',
  'site.com/YourSite/'
)
& 's/ObjectName/' & {!ObjectName.Id}

参考

0
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?