OBJECT Page 50000 Action Issue Example { OBJECT-PROPERTIES { Date=03/04/13; Time=11:06:31 AM; Modified=Yes; Version List=; } PROPERTIES { InsertAllowed=No; DeleteAllowed=No; SourceTable=Table18; DelayedInsert=Yes; PageType=Worksheet; OnOpenPage=BEGIN m_cdeCurrentState := 'OPEN'; SetVisibleOptions(); END; ActionList=ACTIONS { { 1240520009; ;ActionContainer; ActionContainerType=ActionItems } { 1240520010;1 ;ActionGroup; CaptionML=ENU=Actions } { 1240520011;2 ;Action ; Name=New; Promoted=Yes; Visible=m_blnDisplayActionNew; PromotedIsBig=Yes; Image=New; OnAction=BEGIN MESSAGE('Override original "New" action. Do something else.'); END; } { 1240520012;2 ;Action ; Name=Delete; Promoted=Yes; Visible=m_blnDisplayActionDelete; PromotedIsBig=Yes; Image=Delete; OnAction=BEGIN MESSAGE('Override original "Delete" action. Do something else.') END; } { 1240520014; ;ActionContainer; ActionContainerType=RelatedInformation } { 1240520013;1 ;ActionGroup; Name=<Action1240520034>; CaptionML=ENU=Tasks; Visible=False } { 1240520015;2 ;Action ; CaptionML=ENU=Action 1; Promoted=Yes; Visible=m_blnDisplayActionUserSelect1; PromotedIsBig=Yes; Image=Archive; PromotedCategory=Process; OnAction=BEGIN MESSAGE('Show HiddenFor1 Action'); m_cdeCurrentState := 'FOR1'; SetVisibleOptions(); END; } { 1240520016;2 ;Action ; CaptionML=ENU=Action 2; Promoted=Yes; Visible=m_blnDisplayActionUserSelect2; PromotedIsBig=Yes; Image=AnalysisView; PromotedCategory=Process; OnAction=BEGIN MESSAGE('Show HiddenFor2 Action'); m_cdeCurrentState := 'FOR2'; SetVisibleOptions(); END; } { 1240520018;2 ;Action ; CaptionML=ENU=Hidden For 1; Promoted=Yes; Visible=m_blnDisplayActionHiddenFor1; PromotedIsBig=Yes; Image=CheckLedger; PromotedCategory=Process; OnAction=BEGIN MESSAGE('This action was originally hidden. Is should be PromotedIsBig = TRUE. Why am I small.'); END; } { 1240520019;2 ;Action ; CaptionML=ENU=Hidden For 2; Promoted=Yes; Visible=m_blnDisplayActionHiddenFor2; PromotedIsBig=Yes; Image=PhysicalInventory; PromotedCategory=Process; OnAction=BEGIN MESSAGE('This action was originally hidden. Is should be PromotedIsBig = TRUE. Why am I small.'); END; } { 1240520021;2 ;Action ; CaptionML=ENU=Reset Actions; Promoted=Yes; Visible=m_blnShowReset; PromotedIsBig=Yes; Image=ResetStatus; PromotedCategory=Process; OnAction=BEGIN MESSAGE('Reset actions.'); m_cdeCurrentState := 'OPEN'; SetVisibleOptions(); END; } { 1240520017;1 ;ActionGroup; Name=<Action1240520025>; CaptionML=ENU=Show|Hide Information; ActionContainerType=NewDocumentItems } { 1240520020;2 ;Action ; CaptionML=ENU=Another Action; Promoted=Yes; Visible=m_blnDisplayActionAlways; Image=CreatePutAway; PromotedCategory=Category5; OnAction=BEGIN MESSAGE('Some other action that has PromotedIsBig = FALSE. Why am I big.'); END; } } } CONTROLS { { 1240520001;0;Container; ContainerType=ContentArea } { 1240520002;1;Group ; Name=Group; GroupType=Repeater } { 1240520003;2;Field ; SourceExpr="No." } { 1240520004;2;Field ; SourceExpr=Name } { 1240520005;2;Field ; SourceExpr=Address } { 1240520006;2;Field ; SourceExpr=City } { 1240520007;2;Field ; SourceExpr=County } { 1240520008;2;Field ; SourceExpr="Post Code" } } CODE { VAR m_blnDisplayActionNew@1240520001 : Boolean INDATASET; m_blnDisplayActionDelete@1240520002 : Boolean INDATASET; m_blnDisplayActionUserSelect1@1240520003 : Boolean INDATASET; m_blnDisplayActionUserSelect2@1240520004 : Boolean INDATASET; m_blnDisplayActionHiddenFor1@1240520005 : Boolean INDATASET; m_blnDisplayActionHiddenFor2@1240520006 : Boolean INDATASET; m_blnDisplayActionAlways@1240520007 : Boolean INDATASET; m_blnShowReset@1240520009 : Boolean INDATASET; m_cdeCurrentState@1240520008 : Code[10]; PROCEDURE SetVisibleOptions@1240520001(); BEGIN m_blnDisplayActionNew := (m_cdeCurrentState IN ['OPEN']); m_blnDisplayActionDelete := (m_cdeCurrentState IN ['OPEN']); m_blnDisplayActionUserSelect1 := (m_cdeCurrentState IN ['OPEN']); m_blnDisplayActionUserSelect2 := (m_cdeCurrentState IN ['OPEN']); m_blnDisplayActionHiddenFor1 := (m_cdeCurrentState IN ['FOR1']); m_blnDisplayActionHiddenFor2 := (m_cdeCurrentState IN ['FOR2']); m_blnShowReset := m_blnDisplayActionHiddenFor1 OR m_blnDisplayActionHiddenFor2; m_blnDisplayActionAlways := TRUE; END; BEGIN END. } }
Comments
Find out that the icons that start visible are showed as big and the icons that start visible = false are showed small..
but i did not find a solution yet.
Neither have I. The best I have come up with is to change the actions from being Enabled\Disabled.
This is rather cheesy though, as I am showing actions that may or may not be available.
Another issue I am seeing is action that are Promoted, but IsBig false, are still showing up big.
It is a sad day when 2009 R2 renders better!
Hopefully you have better luck solving this one, as I would really like to to work as expected.
Please let me know if you find any alternatives.
mfrabotta