# Using API to Successfully Start Activity Then Errors

**URL:** <https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757>\
**Category:** Epicor ERP 10\
**Tags:** rest, e10, epicor\
**Created:** [July 6, 2023, 3:36pm UTC](https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757 "2023-07-06T15:36:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![John\_Mann](https://www.epiusers.help/user_avatar/www.epiusers.help/john_mann/32/56849_2.png) [@John\_Mann](https://www.epiusers.help/u/John_Mann)\
**Post date:** [July 6, 2023, 3:36pm UTC](https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757/1 "2023-07-06T15:36:17Z")

</div>

I am able to successfully start an activity on multiple jobs from a web app I have created, but only once. If I try a second time to select a couple more jobs I get the following back from /api/v2/odata/t300/Erp.BO.LaborSvc/SelectForWork

1. ErrorMessage: “Employee ID must be unique.”
2. ErrorType: “Ice.BLException”
3. HttpStatus: 400
4. ReasonPhrase: “REST API Exception”

I can refresh the page which causes me to log in again and those same job numbers I just tried a second time will now work when I select them and start activity.

Any ideas, thoughts, questions, or concerns?

---

<div class="post-metadata">

**Author:** ![klincecum](https://www.epiusers.help/user_avatar/www.epiusers.help/klincecum/32/100137_2.png) [@klincecum](https://www.epiusers.help/u/klincecum)\
**Post date:** [July 6, 2023, 3:56pm UTC](https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757/2 "2023-07-06T15:56:40Z")

</div>

Need to bring up the dev tools and look at what you are sending when it errors out.

---

<div class="post-metadata">

**Author:** ![John\_Mann](https://www.epiusers.help/user_avatar/www.epiusers.help/john_mann/32/56849_2.png) [@John\_Mann](https://www.epiusers.help/u/John_Mann)\
**Post date:** [July 6, 2023, 4:40pm UTC](https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757/3 "2023-07-06T16:40:35Z")

</div>

I needed to clear the LaborDtl array after Update is called otherwise I was just appending new LaborDtl object to one that had already been created.

---

<div class="post-metadata">

**Author:** ![klincecum](https://www.epiusers.help/user_avatar/www.epiusers.help/klincecum/32/100137_2.png) [@klincecum](https://www.epiusers.help/u/klincecum)\
**Post date:** [July 6, 2023, 4:42pm UTC](https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757/4 "2023-07-06T16:42:05Z")

</div>

So all good now?

---

<div class="post-metadata">

**Author:** ![John\_Mann](https://www.epiusers.help/user_avatar/www.epiusers.help/john_mann/32/56849_2.png) [@John\_Mann](https://www.epiusers.help/u/John_Mann)\
**Post date:** [July 6, 2023, 5:36pm UTC](https://www.epiusers.help/t/using-api-to-successfully-start-activity-then-errors/104757/5 "2023-07-06T17:36:03Z")

</div>

Appears so, thanks for the tip
