How to update lookup fileld of Kintone using pykintone

 When you try to update kintone record's lookup field, you will fail see the error saying you don't have enough privilege to do that.

"フィールド「XXXX」の値「YYYY」が、ルックアップの参照先のフィールドにないか、またはアプリやフィールドの閲覧権限がありません。"

This is because you need to have both writing access to looking-up application and reading access to looked-up application.

You can include two api tokens in header for REST API, you can also do that by pykintone just connect two api tokens by comma.

import pykintone
app = pykintone.app('tr3xr', "30", "tokenXXX...XXX,tokenYYY....YYY")
Isn't that easy?

Comments

Popular posts from this blog

Calling OpenCV functions via Cython from Python 3.X.

Showing CPU/Memory usage on tmux status bar(tmuxのステータスバーにCPUとMemoryの使用状況を表示する)

Subclassing and Signal connect on a same widget crashes PySide application on exit.