# Can I create automated business logic in the process management?

**URL:** <https://forum.kintone.dev/t/can-i-create-automated-business-logic-in-the-process-management/90>\
**Category:** General\
**Created:** [November 4, 2016, 6:40pm UTC](https://forum.kintone.dev/t/can-i-create-automated-business-logic-in-the-process-management/90 "2016-11-04T18:40:51Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [November 4, 2016, 6:40pm UTC](https://forum.kintone.dev/t/can-i-create-automated-business-logic-in-the-process-management/90/1 "2016-11-04T18:40:51Z")

</div>

I am trying to move my preset process management workflow from one step to the next automatically when a value in a field is changed or updated in a record – can I do that?

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [November 10, 2016, 1:55am UTC](https://forum.kintone.dev/t/can-i-create-automated-business-logic-in-the-process-management/90/2 "2016-11-10T01:55:50Z")

</div>

Hello Dave,

Yes you can certainly do that by using the API that would update the Status of one or mutliple records.

You will need to create a process that would send the API request whenever the field you are going to make it as a trigger is updated at the event of saving a record.

The following page explains about how to update the Status using the API:  
&nbsp;[https://developer.kintone.io/hc/en-us/articles/213149747](https://developer.kintone.io/hc/en-us/articles/213149747)

I hope this helps your question!

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [November 11, 2016, 2:38am UTC](https://forum.kintone.dev/t/can-i-create-automated-business-logic-in-the-process-management/90/3 "2016-11-11T02:38:28Z")

</div>

As Yuzo has stated, you would need to trigger the code when you save your record. The **app.record.create.submit.success** event and **app.record.edit.submit.success** are events that are triggered when a record is saved.

Here is an example of running some code when something is saved:

_**kintone.events.on([‘app.record.create.submit.success’, ‘app.record.edit.submit.success’], function(data) {**_  
_**&nbsp; &nbsp; &nbsp; &nbsp; if (data.record.numberfield.value == 10){**_  
_**&nbsp; &nbsp; &nbsp; &nbsp; window.alert(“We detected a value of 10!”)**_  
\_ **&nbsp; &nbsp; &nbsp; &nbsp; }** \_  
_**});**_

---

<div class="post-metadata">

**Author:** ![legacy\_user](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.kintone.dev/legacy_user/32/25_2.png) [@legacy\_user](https://forum.kintone.dev/u/legacy_user)\
**Post date:** [November 14, 2016, 8:25pm UTC](https://forum.kintone.dev/t/can-i-create-automated-business-logic-in-the-process-management/90/4 "2016-11-14T20:25:22Z")

</div>

That’s great. Thanks, Yuzo and Akira
