public class boFakeOrder:boFakeBizobj { public boFakeOrder() { this.XMLPath="Criteria/Orders"; } } public class boFakeBizobj:ABusinessObject { public string XMLPath=""; // path to node within XML that holds data for this bizobj ... protected override void HookParentRetrieved(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e) { string sXML = ""; // when a row is added to the parent, retrieved is called but // no records will be in the parent bizobj, so there is no Rows in the // collection, so check if there are rows first if(bizObj.GetRowCount()>0) { sXML=bizObj.GetCurrentDataSet().Tables[0].Rows[0]["cSearchCriteria"].ToString(); this.PopulateFromXML(sXML,bizObj); } } protected virtual void PopulateFromXML(string sXML,mmBusinessObject bizObj) { DataSet oDS = this.CreateDataSet(); this.FillFromCriteriaXML(oDS,sXML,bizObj); this.SetCurrentDataSet(oDS); oDS.AcceptChanges(); // This will prevent dataset from being automatically seen as "changed" } protected override void HookParentPreSaving(mmBusinessObject bizObj, mmBusinessStateChangeEventArgs e) { // This hook fires before business rules are applied // and before save is performed. // If the fake bizobj has changed, then the parent's xml // needs to be updated. if(this.IsChanged()) this.UpdateParentXML(bizObj); } }