function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
garagara 

インターネット上のファイルをAttachmentオブジェクトに保存する方法

お世話になっております。

「Visualforce上のボタンをクリックすると、インターネット上のファイル(例えばxlsファイル)をAttachmentオブジェクトに保存する」、という処理を実装したいと考えています。
このような処理は実装可能でしょうか?
可能であれば、どのようなコードが必要でしょうか?

ご助言を頂ければ幸いです。

Best Answer chosen by Admin (Salesforce Developers) 
garagara

自己解決致しました。
PageReferenceクラスの使用により実現することができました。

PageReference pageRef = new PageReference(url);