外部関数との連携
外部JSでカスタム処理を行い、Visual Customize から呼び出す方法です。
ステップ1: カスタム関数を登録
Section titled “ステップ1: カスタム関数を登録”kintone JSカスタマイズとして以下を追加します:
window.vcPlugin = window.vcPlugin || {};window.vcPlugin.callFunction = window.vcPlugin.callFunction || {};
window.vcPlugin.callFunction.notifyDateChanged = function(arg) { const payload = JSON.parse(arg); console.log('Date changed:', payload.startDate, payload.endDate); return 'success';};ステップ2: Visual Customize から呼び出し
Section titled “ステップ2: Visual Customize から呼び出し”ルール: フィールド変更時(終了日)├── callFunction│ ├── functionName: notifyDateChanged│ ├── inputMode: value│ ├── returnType: value│ ├── argument: {"startDate":"{{field:開始日}}","endDate":"{{field:終了日}}"}│ └── afterAction: none