Showing results for 
Search instead for 
Do you mean 
Community Home Request Access Read Blogs Share Your Ideas Search Community View My Settings
Reply
Highlighted
Copper Super Contributor
Posts: 172
Registered: ‎07-06-2010

Saving Extension Entity Changes in Mobile 3 Edit Views

I've added a field from an extension entity (extending Opportunity) to my Add/Edit and Detail views.

 

When Adding a new Opportunity, the Extension entity is created and the value is correctly saved.

When displaying the Opportunity details page, the Extension entity property I query for (by adding it to querySelect) displays properly.

 

When I go to Edit things fall apart. If the field changes, I get an NHibernate NonUniqueObjectException thrown from the Extension entity. The edit view seems to behave as if I'm trying to add a new Extension entity (like adding from a new Opportunity), instead of updating the existing one that it was bound to in the first place.

 

I'm checking

 

this.options.insert

 

and it is coming back FALSE, which is what I expected from navigating to Edit mode. But is there a specific way to tell the view that I am trying to update the Extension entity instead of attempting to add a new one? If I omit the Extension entity fields and save the Opportunity, it updates successfully.

Highlighted
Gold Super Contributor
Posts: 3,087
Registered: ‎03-19-2009

Re: Saving Extension Entity Changes in Mobile 3 Edit Views

If this is a 1:1 extension.. why bother? Since Scorpion (vers 7.0 SLX) 99% of us just extend the base table(s).. SO much easier.

--
RJ Ledger - rjledger@rjlSystems.net +1 603.369.3047 x101

".. Innovators in Mobility - Experts in Workflow Automation..."
http://www.rjlSystems.net - blog: www.rjlSystems.net/blog.html
Highlighted
Bronze Super Contributor
Posts: 152
Registered: ‎02-01-2011

Re: Saving Extension Entity Changes in Mobile 3 Edit Views

What happens in the SLX profiler? How about fiddler? Seems like setting the property via EntityExtension.Fieldname should not be doing an insert at all. Maybe if we could see the layout code for the field.

 

Did you redeploy SData with the entity changes? I forgot to do this and it really screwed me up for a while.

Andy Freeman
TrellisPoint, LLC