Hi All,
In a Customer Entry app-studio layer, I’m performing a “search-show” of the PerCon table in order to present the user with a RoleCode-selectable list of contacts. So far, so good. On a button-click, the user is able to select one or more PerCon records from the displayed dialog.
I’ve been trying to figure out the best way to get those selected contacts into the Contact Dataview (thereby, associating the contacts with the Customer). The low hanging fruit was the possibility of using a Dataview-Merge widget. This, of course, did not work - I suspect because the searchResult and Contact dataviews are shaped differently (different columns).
I haven’t done this yet, but I was considering sending the searchResult DS to an ERP function, work some C# magic and returning a suitable DS that CAN be Dataview-merge’d with Contact.
Associate in what way?
You shoving them into an existing dataset isn’t going to add them to the database or the customer. It may just show up on the grid for that session.
If you actually want to associate those contacts to the customer permanently, you’re going to need to use the business objects.
Thanks Hannah. I was thinking that, but if I was ever successful in shoving the data into the dataview, I thought I’d try an Update method from the BO. It sounds like you’re telling me that would’ve failed.
So, if there isn’t a widget that’ll do a BO.GetNew() AND insert new rows from searchResult (simultaneously), then ERP Function? I have to loop through the searchResult and create new contacts along the way. Seems like it would be very difficult via app-studio?!?
If you make sure to have those added rows have a RowMod of “A”, then call the UI update, it may work. You can use event-next to call onClick_toolUpdate (or some variation of that).
Yes.
I do my very best to put any heavy lifting to the server via functions.
I don’t think that will help you as that’s adding columns. Although, it does have a decent reference to the loop widget “Dataview-condition”.