Skip to Content
0
Feb 16, 2017 at 09:07 AM

C4C - modify objects in Query on custom BO

275 Views Last edit Feb 16, 2017 at 09:17 AM 2 rev

Hi,

We have a custom BO on which we query in the Event-Before SAVE is there a possibility to change the objects - which are results of the query. The current object this. is of course changed but the result of the query is not written to the DB. Must the result object fo the Query be instantiated ?

varqueryGONOGO = GONOGO.QueryByElements;

varselParameterGONOGO = queryGONOGO.CreateSelectionParams();

selParameterGONOGO.Add(queryGONOGO.HDProjectNr, "I", "EQ", this.HDProjectNr);

varresultGONOGO = queryGONOGO.ExecuteFromDB(selParameterGONOGO);

foreach(varresultGONOGOentryinresultGONOGO) {

if ( resultGONOGOentry.HDGoNoGoID != this.HDGoNoGoID ) {

resultGONOGOentry.HDLastGnGobyOpp = false;

HOW TO CHANGE the Query result object ??

}

} // foreach

} // if ACCOORD

Thanks - Regards,

Jeroen Cosijnse