0
0

More than 1 year has passed since last update.

バーコード をSalesforceで使う

Last updated at Posted at 2022-08-17

まとめページに戻る
まとめA~M

QRコードの作成

私の覚えpartialのコールアウト管理というコンポーネントで実験 2022-08-23

試にAura コンポーネントに表示できるかを確かめてみます。

<img src="http://chart.apis.google.com/chart?cht=qr&chs=130x130&chl=http://www.atmarkit.co.jp/ait/subtop/win/" />

保存できないですねぇ。相変わらず意味不明。やる気を削ぐことだけは超一流ですな。

Failed to save fkd_callout.cmp: ParseError at [row,col]:[317,76] Message: The reference to entity "chs" must end with the ';' delimiter.: ソース

&が悪さしているようだ。&に置き換えます。

<img src="http://chart.apis.google.com/chart?cht=qr&amp;chs=130x130&amp;chl=http://www.atmarkit.co.jp/ait/subtop/win/" />

おお、そのまま表示できたぞ。

image.png

VF PageのPDFに使えるか?

アカン、アイコンが壊れている。

image.png

PDF の場合、Google に対するクライアントの IP は、セールスフォースの外部 IP アドレスです。
HTML の場合は、クライアント マシンの IP アドレスです。

無料アクセスの制限は、クライアントの IP アドレスに基づいています。そのため、データセンター内の多くのユーザー/組織が Google マップを使用している場合、無料アクセスの制限を簡単に超えてしまう可能性があります。

しかし会社のホームページにある会社のロゴでも同じエラーになる。これが原因でないかな?

問題は、PDF レンダリング エンジンが Apex と同じセキュリティ制限の下で実行されることでした。つまり、外部 URL は、レンダラーによって使用されるリモート サイトの設定で許可されている必要があります。

リモートサイトの設定したんだけど、うまく表示されないですね。

googleの方はリモートサイトの設定で機能した。
何で会社のサーバーはダメなんだ?

image.png

画像ファイルが svgだったから? jpegにしたら表示されました。

image.png

http://chart.apis.google.com/chart?cht=qr&chs=130x130&chl=https://fukadadenki--dev2.lightning.force.com/lightning/r/CustomObject1__c/a126D000000N7LVQA0/edit

https://chart.apis.google.com/chart?cht=qr&chs=130x130&chl=https://fukadadenki--dev2.lightning.force.com/lightning/r/CustomObject1__c/a126D000000N7LVQA0/edit

https://chart.apis.google.com/chart?cht=qr&chs=130x130&chl=https://fukadadenki--dev2.lightning.force.com/lightning/r/CustomObject1__c/a126D000000N7LVQA0/edit?count=2&backgroundContext=%2Flightning%2Fr%2FCustomObject1__c%2Fa126D000000N7LVQA0%2Fview
0
0
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
0