Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
customization:limiting-feature-access [2014-01-24 16:46] Martin Berg |
customization:limiting-feature-access [2016-03-08 12:45] Martin Berg Page moved from relnotes:releases:customization:limiting-feature-access to customization:limiting-feature-access |
||
---|---|---|---|
Line 3: | Line 3: | ||
Before the //Mass update// menu is shown a VBA event is triggered that allows customization of which fields or objects that can be updated or created. This event also receives information of which fields or objects that the user wants to update. The event has the following signature: | Before the //Mass update// menu is shown a VBA event is triggered that allows customization of which fields or objects that can be updated or created. This event also receives information of which fields or objects that the user wants to update. The event has the following signature: | ||
- | Innan Lime visar menyn Massuppdatera skickar den event till VBA för att få reda på vilka fält eller objekt som kan uppdateras eller skapas. Detta event skickar med det fält eller objekt som skapa uppdateras eller skapas och ser ut på följande vis: | + | < |
- | Explorer.BeforeCommand(Command | + | '' |
- | •Command anger typ av kommando och har värdet | + | |
- | •Parameter | + | '' |
- | När ett fält ska massuppdateras är Parameter ett objekt typen LDE.Field | + | ; |
- | + | ; | |
- | När nya objekt ska skapas är Parameter ett objekt av typen LDE.IProperties | + | |
- | TargetClass | + | '' |
- | SourceClass | + | |
- | •Cancel som är flagga som låter dig bestämma om fliken ska visas i menyn eller inte. Sätter du den till False (vilket är standardvärdet för de flikar Lime visar som standard) så läggs fliken till i menyn annars inte. | + | The following example makes sure it's only allowed to mass update fields beginning with the letter " |
- | + | ||
- | Följande exempel låter användarna uppdatera standardflikarna plus personfliken från företagslistan: | + | |
<code vb> | <code vb> | ||
Private Sub Explorer_BeforeCommand(Command As CommandEnum, | Private Sub Explorer_BeforeCommand(Command As CommandEnum, | ||
- | + | ||
- | ' | + | ' |
- | If Command | + | If Command |
- | + | ||
- | ' | + | ' |
- | | + | If TypeOf Parameter Is LDE.Field Then |
- | + | If Left(Parameter.LocalName, | |
- | ' Tillåt inte fält som börjar på A | + | Cancel = True |
- | | + | End If |
- | | + | End If |
- | End If | + | |
- | + | ||
- | | + | |
- | If TypeOf Parameter Is LDE.Properties Then | + | |
- | + | ||
- | ' | + | |
- | If Parameter.Get(" | + | |
- | + | ||
- | ' Ändra inte flaggan för standardflikar | + | |
- | If Cancel = True Then | + | |
- | + | ||
- | ' | + | |
- | If Parameter.Get(" | + | |
- | Cancel = False | + | |
- | | + | |
- | | + | |
- | End If | + | |
- | End If | + | |
- | End If | + | |
End Sub | End Sub | ||
</ | </ |