I added a field to the smmActivitites table. I am searching for a way to use that field to filter the grid in the ProjBudgetRevision form which uses the TmpProjBudgetRevisionLine witch it happens to be a InMemory table type.
I have tried adding the field to the TmpProjBudgetRevisionLine table and populate the field using the onInserting event handler of the table, but the event never gets hit. I have also tried the onValidateWrite event which gets hit only when inserting new rows from the grid, but not when the table gets populated when initializing the form, and event when the event gets hit I am no able to update the field from there.
For now I have added the field with a display method, but as I said I need to filter the grid using that field witch I can not do!
Any Ideas?
Thanks in advance for your help.
*This post is locked for comments
Thanks for pointing me in the right direction. After reviewing the code I found what was wrong and get it to work!
This is what I am doing in the post event handler of the ProjBudgetRevisionManager_Post_getRevisionCostLines. I don't see why this would not work. I guess there is something about inmemory tables I don't know.
Any suggestions or comments will be much appreciated.
[PostHandlerFor(classStr(ProjBudgetRevisionManager), staticMethodStr(ProjBudgetRevisionManager, getRevisionCostLines))]
public static void ProjBudgetRevisionManager_Post_getRevisionCostLines(XppPrePostArgs args)
{
TmpProjBudgetRevisionLine tmpRevLine =args.getReturnvalue() as TmpProjBudgetRevisionLine;
ProjBudgetRevisionLine projBudgetRevisionLine;
ProjBudgetRevisionManagerActionType _action= args.getArg(identifierStr(_action));
RecId _projBudget= args.getArg(identifierStr(_projBudget)) ;
RecId _projBudgetRevision= args.getArg(identifierStr(_projBudgetRevision)) ;
update_recordset tmpRevLine
setting ISProjWBSEquivalente = "VALUE"
join projBudgetRevisionLine
where
projBudgetRevisionLine.ProjBudgetLine == tmpRevLine.ProjBudgetLine &&
projBudgetRevisionLine.ProjBudgetRevision == _projBudgetRevision;
Args.setReturnValue(tmpRevLine);
}
Hi Emilio Molina!
I mean what in this class you can find methods which populate data to TmpProjBudgetRevisionLine table and you can extend this class and write some logic.
Hi Rustem Galiamov. Thanks a lot for your time. I reviewed the getRevisionRevenueLines method on the ProjBudgetRevisionManager class as you suggested. I'd tried extending the post event handler and making an update_recordset of the tmpRevLine, but even it doesn’t throw any error the table does not get updated!
What is what you have in mind?
Thanks a lot for your help.
Hi Emilio Molina!
Take a look at init() method on projBudgetRevLineRevenueTmp DS of the form. Then to the getRevisionRevenueLines() method on ProjBudgetRevisionManager class.
Kempeth
4
Andy Adamak
4
Community Member
4