Select to view content in your preferred language

[Utility Network] Edit subnetwork controller through JavaScript App leads to error

284
1
03-19-2024 06:00 AM
DanielCarrion2
New Contributor

When trying to make an edit on a subnetwork controller within a Web App based on the Maps SDK for JavaScript we are facing the following problem:

According to the JS docs we have to supply the attribute values of all non nullable fields:

"An array or a collection of features to be updated. Each feature must have valid objectId. Values of non nullable fields must be provided when updating features. [...]"

That's why we are including the ASSETGROUP and ASSETTYPE attributes in the request even if they haven't been modified by the current edit (e.g. when just the geometry was modified). Unfortunately the server then reports an error back because apparently it thinks that the assetgroup or assettype values have been modified. 

"Internal error during object update. Features that are utility network subnetwork controllers do not support edits to asset group or asset type attributes."

When we send the edit request directly through the REST endpoint and remove the assettype and assetgroup attributes the update works nicely

So here comes my question. Is the statement: "Values of non nullable fields must be provided when updating features" really accurate? Why do I have to supply these attributes even if they haven't changed. At least in the context of the Utility Network this causes subsequent issues.

 

Tags (1)
0 Kudos
1 Reply
RichRuh
Esri Regular Contributor

Hi Daniel,

This looks like a mistake in our documentation. You should not have to provide the value of nonnullable fields when updating a feature, unless of course you intend to change the value of those fields.

I hope this helps,

--Rich

0 Kudos