AL icon indicating copy to clipboard operation
AL copied to clipboard

Page Extension: Feature Request: layout -> modify -> Support ShowMandatory Property

Open bleisibach opened this issue 8 years ago • 14 comments

Hi Team

Add support for the property ShowMandatory in modify() please

image

Thank you.

bleisibach avatar Feb 19 '18 13:02 bleisibach

We generally don't expose properties that would lead to conflicting/undefined behavior in case 2 or more extensions modify the same property. In this case you could have another extension modifying it to False. We will investigate what could be done in this case, perhaps we only allow to set it to True. I will use this issue for tracking.

StanislawStempin avatar Feb 20 '18 10:02 StanislawStempin

I fully understand your point. Allow to set it to True would be a valuable solution. IMO, the potential conflict/undefined behavior in case 2 or more extensions is applicable for the majority of properties.

bleisibach avatar Feb 21 '18 09:02 bleisibach

I would also like to request the ability to set ShowMandatory to true as a Page Extension. Is this still under consideration?

RobynGee avatar Aug 28 '18 05:08 RobynGee

Indeed, allowing to set it to 'True' would be a valuable solution !

Phfo avatar Aug 28 '18 13:08 Phfo

We generally don't expose properties that would lead to conflicting/undefined behavior in case 2 or more extensions modify the same property.

Hi Stanislaw,

isn't this the same for editable or visible? These are conflicting too in my opinion. So how did you solve the problem for editable and visible? What about "concatenation" with AND?

Extension 1 says Yes Extension 2 says No => Client says Yes. :-)

Regards Markus

MarkusWinBI avatar Oct 12 '18 10:10 MarkusWinBI

Hi Stanislaw,

I would really like to be able to set the ShowMandatory property of a base field in a Page Extension, we built an extensive feature allowing clients to configure mandatory fields and this feature relies heavily on the ability to visually identify the mandatory fields.

Many thanks, Wiechardt

Wiechardt avatar Oct 30 '18 15:10 Wiechardt

Hi Wiechardt,

I found an evil workaround. :-) Just "remove" the Field from the page and "create" a new one. That's the way I do it. Then you can set every property you want! ;-)

Regards Markus

MarkusWinBI avatar Oct 31 '18 17:10 MarkusWinBI

Thanks Markus, ithe evil workaround did the trick. :-)

An issue with this workaround is the fact that the "Choose Columns" will display the same column name multiple times which is not ideal.

Wiechardt avatar Nov 01 '18 11:11 Wiechardt

If the old field is removed with visible = false AND Enabled = false, it should not show up.

stephanweidmann avatar Nov 02 '18 07:11 stephanweidmann

Hi Stephan,

I added the code below to the Page Extension for General Ledger Entries page but the Job No. is still available when using "Choose Columns" on the page:

    modify("Job No.")
    {
        Visible = false;
        Enabled = false;            
    }

Wiechardt avatar Nov 02 '18 08:11 Wiechardt

Maybe this could be solved by filling ApplicationArea with a nonexistant value, but this may not be supported for all time. ( #3091 )

stephanweidmann avatar Nov 02 '18 08:11 stephanweidmann

We will implement support for modifying the ShowMandatory property and see what other properties we can enable for modification. The workaround proposed above works fine if only one extension does it but imagine many extensions doing the same trick to the same field - you will end up with N copies of the same field, potentially each shown in a different way with a slightly different name.

StanislawStempin avatar Nov 07 '18 13:11 StanislawStempin

Much appreciated.

Wiechardt avatar Nov 07 '18 16:11 Wiechardt

Hi, thanks for reporting this issue. This is now fixed in our master branch and will ship in a future update!

ghost avatar Nov 09 '18 08:11 ghost