locked
LS 2013 SL remove created by / modified by /... from autogenerated add / edit dialogs? RRS feed

  • Question

  • hi!

    is there a way to remove those fields from autogenerated dialogs in silverlight client? there is no options to set "display by default" for that specific properties.. thanks!

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Wednesday, April 2, 2014 9:04 AM

Answers

  • Hi Kivito,

    Yes you can but I only manage this by editing the metadata. Either here in a client project's entity property overrides:

          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[CreatedBy]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>
          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[Created]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>
          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[ModifiedBy]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>
          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[Modified]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>

    ... or here directly in the server project entity .lsml usinf 'Hidden' attribute:

          <EntityProperty
            Name="CreatedBy"
            IsReadOnly="True"
            PropertyType=":Person?">
            <EntityProperty.Attributes>
              <Generated />
              <NotSearchable />
              <Hidden />
              <MaxLength
                Value="255" />
            </EntityProperty.Attributes>
          </EntityProperty>

    I prefer custom detail screens myself.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.


    • Edited by Xpert360 Wednesday, April 2, 2014 11:47 AM
    • Proposed as answer by Xpert360 Wednesday, April 2, 2014 11:47 AM
    • Marked as answer by Kivito Wednesday, April 2, 2014 1:22 PM
    Wednesday, April 2, 2014 11:45 AM

All replies

  • Hi Kivito,

    Yes you can but I only manage this by editing the metadata. Either here in a client project's entity property overrides:

          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[CreatedBy]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>
          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[Created]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>
          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[ModifiedBy]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>
          <EntityProperty>
            <EntityProperty.Attributes>
              <Proxy
                Target="ServiceInterface:PivotData/Properties[Modified]" />
              <Hidden />
            </EntityProperty.Attributes>
          </EntityProperty>

    ... or here directly in the server project entity .lsml usinf 'Hidden' attribute:

          <EntityProperty
            Name="CreatedBy"
            IsReadOnly="True"
            PropertyType=":Person?">
            <EntityProperty.Attributes>
              <Generated />
              <NotSearchable />
              <Hidden />
              <MaxLength
                Value="255" />
            </EntityProperty.Attributes>
          </EntityProperty>

    I prefer custom detail screens myself.

    Dave


    Dave Baker | AIDE for LightSwitch | Xpert360 blog | twitter : @xpert360 | Xpert360 website | Opinions are my own. For better forums, remember to mark posts as helpful/answer.


    • Edited by Xpert360 Wednesday, April 2, 2014 11:47 AM
    • Proposed as answer by Xpert360 Wednesday, April 2, 2014 11:47 AM
    • Marked as answer by Kivito Wednesday, April 2, 2014 1:22 PM
    Wednesday, April 2, 2014 11:45 AM
  • thanks Dave! that did the trick..

    cheers!

    Kivito


    Nobody expects the Spanish Inquisition! (M.P.F.C.)

    Wednesday, April 2, 2014 1:22 PM