How to show or hide an action menu in Purchase header when a line is modified
Line
I can do easily to show or hide Lines Action menu when Line column values are modified but I cannot know how to set on Header Action
Thanks

How to show or hide an action menu in Purchase header when a line is modified
Line
I can do easily to show or hide Lines Action menu when Line column values are modified but I cannot know how to set on Header Action
Thanks
Hi peter,
I think to show/hide actions on the header from the lines, you would need to create a custom flag on the header. This custom flag on the header is updated based on the modification you make on lines. Then, on the actions of the document page (which you want to hide/show), you would have to set the visibility flag variable. This variable is updated in the OnAfterGetCurrentRecord trigger of your page, based on the custom flag value that you just update from the line..
sample code..
pageextension 50000 "Purchase Order Ext" extends "Purchase Order"
{
actions
{
modify(YourAction)
{
Visible = HideActionVariable;
}
}
trigger OnAfterGetCurrRecord()
begin
if (Rec.CustomHideActionField = true) then
HideActionVariable := true;
else
HideActionVariable := false;
end;
var
HideActionVariable: Boolean;
}
Hope it helps..
Regards