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
thsrthsr 

○○ クラス内部でログインユーザIDを取得する方法? ○○

クラス内部でログインユーザIDを取得する方法はありませんか?

 

やりたいのはデータ削除を行うときにデータの作成者(CreatedById)がログインユーザIDと一致したデータのみ削除したいんですが、

 

ご存知の方がいらっしゃいましたら、ご教授いただけたら幸いです。

 

以上、よろしくお願いします。

Best Answer chosen by Admin (Salesforce Developers) 
ue123ue123

UserInfoクラスから取得できますよ

 

UserInfo Methods

All Answers

ue123ue123

UserInfoクラスから取得できますよ

 

UserInfo Methods

This was selected as the best answer
thsrthsr

ご回答ありがとうございます。

とても参考になりました。

 

またよろしくお願いいたします。:smileywink: