I’ve created a button to launch “Fixed Fee Invoice Review” from the Project Entry screen
It has the MenuID “PBGO1070”…
When I open it from the Menu tile it opens to the correct form, but when I open it from the button click it opens another form the uses the same base program
I built a BAQ to have a look at the Menu item form Arguments, it looks like the “Fix Fee Invoice Review” Menu item has a form that loads on top of the base program…
Does anybody know how to make lfo launch the correct form…
PBGO1070 = Fixed Fee Invoice Review
PBGO1060 = Time and Material Invoice Review
PBGO1080 = Cost Plus Invoice Review
PBGO1090 = Progress Payment Invoice Review
They all use the same base program but when you try and launch any one of them from an LFO only the “Time and Material Invoice Review” screen open regardless of which menuID
perhaps you need to pass the argument you found into the ValueIn or ContextValue. I tried looking at the class in Visual Studio, but not seeing anything definitive. Interested to know the answer here.
I have tried option 3 … works like magic and loads all pending Project FixFee invoices for review (not the intended result, was hoping the filter would work)
I also tried the code below - This loads the right form but no records
System.Collections.Hashtable myHash = new System.Collections.Hashtable();
LaunchFormOptions lfo = new LaunchFormOptions ();
myHash.Add("form","FFReviewForm");
myHash.Add("ProjectID",ProjNum);
lfo.ValueIn = myHash;
ProcessCaller.LaunchForm (oTrans, "PBGO1070", lfo);
I’m now trying to work out how to get the second piece of code to load a record…
Was not aware of ILSpy. Reading from the link you shared just opened up my world to understanding how these screens work and “process” behind the scenes.
Likely will have to pass the value in the ContextValue field or in your new fancy hashtable, and in a customization of the subscreen load the record programmatically.
I can get the value to pass to the form that I am launching… (the value is displaying fine in a message box on the load of the form) but I can’t get it to load the record @hasokeric I’ve been looking at some of your work, have you got any pointers for me?
I think the problem is… to launch the approval form you need 2 variables one is the ProjectID and the other is the Invoice number, when launching from the Project Entry screen you only have the ProjectID to pass in,
I think I’ll have to work more on the search adapter which I sort of have working but it loads all of the results from all projects, I can’t get the PreLoadSearchFilter to work
This is the code I’ve pulled together but it loads all results (the filter doesn’t work)
private void LaunchFixFeeApp()
{
EpiDataView edvProjNum = (EpiDataView)(oTrans.EpiDataViews["Project"]);
String ProjNum = edvProjNum.dataView[edvProjNum.Row]["ProjectID"].ToString();
// Define a reference to the transaction (oTrans) for the form you are calling.
Erp.UI.App.PBGInvcReviewEntry.Transaction trans = new Erp.UI.App.PBGInvcReviewEntry.Transaction(oTrans);
// Next define a reference to the form itself
Erp.UI.App.PBGInvcReviewEntry.FFReviewForm form = new Erp.UI.App.PBGInvcReviewEntry.FFReviewForm(trans);
// Define a search that loads up TEST1234 automatically when the form launches
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
// opts.PreLoadSearchFilter = "ProjectID LIKE 'ProjNum'";
opts.PreLoadSearchFilter = "ProjectID = '" +ProjNum+ "'";
opts.DataSetMode = DataSetMode.RowsDataSet;
// Actually execute the search. This and all other oTrans methods are available
trans.InvokeSearch(opts);
// Show time
form.ShowDialog();
}
As per the gif, I need to do a search within a search, bugged if I know how to get that to work haha
So if you want the screen to pre load with records, how do you yourself know which invoices you want it to pull up? Is it just all for that project that appear in that adapter?