Hello, Murat!
You can use functional options linked with information registers
For exaple,
If you need command linked with user that creates a document:
1. Create information register that will keep visibility settings (you can also use a catalog).
Dimension: User, resource: Visible
2. Create a functional option and a functional option parameter.
Link function option with resource of information register and functional option parameter with dimension of information register (see attachment "option.png")
3. Link command with functional option (see attachment "command.png")
4. In form module write the following script:
Code |
---|
&AtClient
Procedure UserOnChange(Item)
SetFormFunctionalOptionParameters(New Structure("User", Object.User));
EndProcedure
&AtServer
Procedure OnCreateAtServer(Cancel, StandardProcessing)
SetFormFunctionalOptionParameters(New Structure("User", Object.User));
EndProcedure |
See example "1cv8.cf" in attachment. Try to change user in document and visibility of commands will change.