2
2

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 5 years have passed since last update.

kintoneにてログインユーザーの氏名を取得する

Last updated at Posted at 2019-06-07

###kintoneで入力フォームを表示した際にログインユーザー名をフォームに入れる

kintoneで入力フォームを作成し、新規レコード登録画面を開いた際にログインユーザー名を取得、フォームに表示させるスクリプト。
※氏名の入力フォームのフィールドコードは「氏名」。

inputForm.js
   // レコード新規作成時
   kintone.events.on(["app.record.create.show"], function(event){
      
      // ログインユーザ名を取得
      var record = event.record;
      var loginUser = kintone.getLoginUser()['name'];
      
      record['氏名']['value'] = loginUser;
      
      return event;
       
   });

2
2
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
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?