Avatar

How to Add 'action' when click button in a open modal?

Yosafat Rissy

Hi guys,

I'm making 2 apps, it's Sales Control and Sales Activity.

This is Sales Control App, and when I lookup the data from Sales Activity it will show this lookup modal.

The idea is, when I click on button set, the Estimation Amount will goes to field month in Sales Control App (if Date = January then it goes to January cell, if Date = Feb then it goes to February cell and so on).

I've check the documentation about put coding in modal but still don't find it. 

Could you guys please help me with this? 

 

 
Follow 2 followers
0

2 comments

Avatar
Yuzo Arai 0 votes

Hello Yosafat

Here's an example flow of how it can be done:

1. Obtain a record data using the lookup field
2. Place the record number of the obtained data in one of the fields
3. Set a field change event(*1) in the field mentioned in step 2.
4. Within the event, using the record number as a key, obtain the target record data by API (*2)
5. Determine the month of the obtained data and place the amount in the corresponding month's field

*1 kintone developer network - Record Create Event - Field Change Event
    https://developer.kintone.io/hc/en-us/articles/213149077-Record-Create-Event#FieldChangeEvent

    kintone developer network - Record Edit Event - Field Change Event
    https://developer.kintone.io/hc/en-us/articles/213149017/#FieldChangeEvent

*2 kintone developer network - Get Record (GET)
    https://developer.kintone.io/hc/en-us/articles/213149287/

I hope this helps

0
Comment actions Permalink