How to pass parameters to Editor tool

590
2
Jump to solution
05-03-2013 06:05 AM
DougCollins
Occasional Contributor
I am trying to use the editing widget to edit a feature layer in a feature service that has related tables with a Primary key to Foreign key relation.  The problem I am having is the once I try to place a point on the map using the editing tool, I get an error stating that it violates the FK-PK policy.  This is because I am not supplying the new point with a Foreign key value.

So, I am wondering if there is a way to pass in or supply the editor tool a parameter when I add the new point to the map?

Thanks,
Charlie
0 Kudos
1 Solution

Accepted Solutions
MattLane
Occasional Contributor II
You can modify the edit before it goes to the server using the onBeforeApplyEdits event. http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/featurelayer.html#onBeforeApplyEdits. How are you determining the foreign key?

View solution in original post

0 Kudos
2 Replies
MattLane
Occasional Contributor II
You can modify the edit before it goes to the server using the onBeforeApplyEdits event. http://help.arcgis.com/en/webapi/javascript/arcgis/jsapi/featurelayer.html#onBeforeApplyEdits. How are you determining the foreign key?
0 Kudos
DougCollins
Occasional Contributor
Thanks for the information.  This sounds like it might be what I was looking for.

I am getting the FK info from other code that wraps my JS map.

Thanks
Charlie
0 Kudos