Workforce unable to batch load workorderid field

196
1
07-09-2021 02:50 PM
ahagopian_coj
New Contributor II

Hello!  I am trying to write a simple script that will batch create assignments from an existing feature class.  My existing feature class is using the GlobalID field as a primary key for linking to other data tables.  As a result I want to use the GlobalID field.  When I run my snippet of code in Jupyter Notebook it gives me an error: 

TypeError: __init__() got an unexpected keyword argument 'workorderid'

Here is my code:

ahagopian_coj_0-1625867311567.png

 I did try to use other fields such as CustomerID and it threw the same error.  Very maddening!  Any hints or clues on what I am doing wrong?

0 Kudos
1 Reply
AaronPulver
Esri Regular Contributor

You need to use the correct argument name of work_order_id. The assignment class is documented here:

https://developers.arcgis.com/python/api-reference/arcgis.apps.workforce.html#assignment

0 Kudos