you should be able to trap on Getnew for the sales order and new part adapters, use the wizard to add an after adapter event and then check for the getnew method. You can put in a messagebox to show the exact name of the method. In 8 I forget if there is a wizard to add it but you should be able add an event to trap toolbar manager toolclick via hand entered code or wizard if available and then check args.tool.key for "cleartool".
JK
JK
--- In vantage@yahoogroups.com, "thedemondamian" <sheath@...> wrote:
>
> Dele,
>
> Your solution worked like a charm. There is definitely a problem somewhere in the design.
>
> Now I have to figure out how to clear my ultragrid when a new sales order created, a new part is added and the Clear button on the toolbar is pressed.
>
> Anybody know what events these are?
>
> _ Scott
>
>
>
> --- In vantage@yahoogroups.com, "jckinneman" <jckinneman@> wrote:
> >
> > Good thinking outside the box. Probably confirms at least a design flaw.
> >
> > Thanks,
> > JK
> >
> > --- In vantage@yahoogroups.com, "deleoye" <deleoye@> wrote:
> > >
> > >
> > >
> > >
> > >
> > >
> > > I've got it working on v8.0.409 after studying the differences in the way BL Tester (i.e. the Business Objects) and the adapter code handled the QueryDesignData and DynamicQueryData datasets. Even though it was a bit "brute-forcish", I simply copied the tables from the QueryDesignData and DynamicQueryData after the AddWhereItem has been run. The code is used to drive one of the most commonly used screens in my company and seems to work OK. (Enclose in a Try/Catch construct for robustness.)
> > >
> > > Dim baqID as String = "BAQName"
> > > Dim dynQryAD As DynamicQueryAdapter = New DynamicQueryAdapter(oTrans.EpiBaseForm)
> > > Dim pcTable As String = ""
> > > Dim pcField As String = ""
> > > Dim pcValue As String = ""
> > > Dim pbIsConst as Boolean = True
> > > Dim pbNeg as Boolean = False
> > > Dim pbSucceed as Boolean = False
> > > Dim pcLeftParentheses as String = "("
> > > Dim pcRightParentheses as String = ")"
> > > Dim pcCondition as String = "="
> > >
> > > pcTable = "Part"
> > > pcField = "PartNum"
> > > pcValue = QueryFieldValue
> > > dynQryAD.BOConnect()
> > > dynQryAD.GetByID(baqID) '
> > > dynQryAD.AddWhereItem(dynQryAD.QueryDesignData, baqID, pcTable, pcField, pcCondition, pbIsConst, pcValue, "", "", pcLeftParentheses, pcRightParentheses, "", pbNeg)
> > > dynQryAD.Update()
> > >
> > > '//copy all data from QueryDesignData tables to DynamicQueryData tables (only for tables that exist in both datasets)
> > > Dim targetRow as DataRow
> > > For each table as DataTable in dynQryAD.DynamicQueryData.Tables
> > > For Each sourceRow as DataRow in dynQryAD.QueryDesignData.Tables(table.ToString()).Rows
> > > targetRow = table.NewRow()
> > > targetRow.ItemArray = sourceRow.ItemArray
> > > table.Rows.Add(targetRow)
> > > Next
> > > Next
> > > dynQryAD.Execute(dynQryAD.DynamicQueryData)
> > > Dim ds As DataSet = dynQryAD.QueryResults
> > >
> > >
> > > Dele Oyebande
> > > Autac Products
> > >
> > > --- In vantage@yahoogroups.com, "jckinneman" <jckinneman@> wrote:
> > > >
> > > > I am beginning to believe it is a version issue as I do interact with this bo/adapter all the time in 9 but as several of us have tried can not get the same in 8. I implemented the same code in 8 and get the error that the datasets are not right as seen by others. Since this BO is not used by many there may very well be an undiscovered/unreported bug in 8 that was fixed along the way in 9.
> > > >
> > > > Jim Kinneman
> > > > Senior Consultant
> > > > Encompass Solutions Inc
> > > >
> > >
> >
>