Hello Everyone, I want to disable the delete or alter features of all sales vouchers and all ledgers in Tally Prime 2.1 but User-wise. If I open tally from my user I can use tally as it is but if any of my employees is opening tally by his username tally should not allow him the option to delete or any voucher. I tried to modify the delete key but it didn't work as per my requirements. Code: [#Key: Delete Line Object] Inactive: not $$CmpUserName:"admin" [#Key: Delete Line ObjectEx] Inactive: not $$CmpUserName:"admin" [#Key: BtmBar Delete Line Object] Inactive: not $$CmpUserName:"admin" [#Key: Form Delete Master] Inactive: not $$CmpUserName:"admin" [#Key: BottomToolBarBtn3_Delete] Inactive: not $$CmpUserName:"admin" [#Key: Form Delete Object] Inactive: not $$CmpUserName:"admin" [#Key: Form Delete Object] Inactive: not $$CmpUserName:"admin" [#Key: Form Delete] Inactive: not $$CmpUserName:"admin"
Try This Code: [#Key: Delete Line Object] Inactive : Not $$IsCmpOwner [#Key: Delete Line ObjectEx] Inactive : Not $$IsCmpOwner [#Key: BtmBar Delete Line Object] Inactive : Not $$IsCmpOwner ; Inactive: not $$CmpUserName:"admin" [#Key: Form Delete Master] Inactive : Not $$IsCmpOwner [#Key: BottomToolBarBtn3_Delete] Inactive : Not $$IsCmpOwner [#Key: Form Delete Object] Inactive : Not $$IsCmpOwner [#Key: Form Delete Object] Inactive : Not $$IsCmpOwner [#Key: Form Delete] Inactive : Not $$IsCmpOwner
In case you want only admin to have delete button access: Code: Inactive : Not $$CmpUserName = $OwnerName:Company:##SVCurrentCompany
Use Option in Button level like this [#Key: Delete Line Object] Option : Delete Line Object MyCtrl:Not $$IsCmpOwner [!keyelete Line Object MyCtrl] Delete :Inactive Inactive: Yes
Observed that in few cases, "INACTIVE" has been defined in local level for Parts/Lines. To override we have to modify that at local level only. adding option doesn't work for that. Here is the code to disable delete in Daybook/Ledger Voucher report. Code: [#Key: Delete Line Object] Option : InactiveKey : @@InactiveDelete [#Key: Delete Line ObjectEx] Option : InactiveKey : @@InactiveDelete [#Key: BtmBar Delete Line Object] Option : InactiveKey : @@InactiveDelete [#Key: Form Delete Master] Option : InactiveKey : @@InactiveDelete [#Key: BottomToolBarBtn3_Delete] Option : InactiveKey : @@InactiveDelete [#Key: Form Delete Object] Option : InactiveKey : @@InactiveDelete [#Key: Form Delete] Option : InactiveKey : @@InactiveDelete [#Key: BottomToolBarBtn3] Option : InactiveKey : @@InactiveDelete [#Line: DSP VchToolBarVariableSet] Local : Key : Delete Line Object : Inactive: @@InactiveDelete OR NOT $$CanDelete OR (NOT $$Allow:Alter:Vouchers) OR (NOT $$Allow:Alter:BackDatedVouchers) OR NOT $$Allow:Alter:$VoucherTypeName [#Form: DSP Voucher Report Keys] Local : Key : BtmBar Delete Line Object : Inactive : @@InactiveDelete OR NOT $$HasVouchers OR (NOT $$Allow:Alter:Vouchers) OR (NOT $$Allow:Alter:BackDatedVouchers) OR NOT ##OnFocusInactiveAlter [#Form: List of Accounts] Local : Key : Form Delete Master : Inactive : @@InactiveDelete OR NOT @@AllowAlterMaster [#Form: DatExc Buttons] Local : Key : Form Delete Master : Inactive : @@InactiveDelete OR NOT @@AllowDatExcAlterMst [#Form: DatExc VchBtmButtons] Local : Key : Form Delete Master : Inactive : @@InactiveDelete OR NOT @@AllowDatExcAlterVch [#Line: CA ListOfAccountsLedgerWise] Local : Key : Form Delete Master : Inactive : @@InactiveDelete OR NOT $$CanDelete OR NOT $$Allow:Alter:AccountsMasters [#Line: CA ListOfAccountsItemWise] Local : Key : Delete Line Object : Inactive : @@InactiveDelete OR NOT $$CanDelete OR NOT $$Allow:Alter:InventoryMasters [#Line: CA AccDetails] Local : Key : Delete Line object : Inactive : @@InactiveDelete OR $$IsExploded OR NOT $$CanDelete OR NOT $$Allow:Alter:AccountsMasters [#Line: AccType Detail] Local : Key : Delete Line object : Inactive : @@InactiveDelete OR $$IsExploded OR NOT $$CanDelete [!Key : InactiveKey] Inactive : @@InactiveDelete [System: Formula] InactiveDelete : Not $$CmpUserName = $OwnerName:Company:##SVCurrentCompany
You Should use $$IsCmpOwner for Condition Check like below Code: [System: Formula] InactiveDelete : Not $$IsCmpOwner