/* Dear All, I want to rename all ledger with a prefix. But code is not working.. Please correct the code */ [#Menu : Gateway of Tally] Add : Item : ALTER LEDGER : Alter: AlterLedgerName [Report : AlterLedgerName] Form: AlterLedgerName Object : Ledger Title : "ALTER LEDGER" [Form: AlterLedgerName] Part: AlterLedgerName On: Form Accept: Yes: Form Accept [Part:AlterLedgerName] Line:AlterLedgerName Repeat: AlterLedgerName : RenameLedgers Object : Ledger [Line:AlterLedgerName] Field:AlterLedgerName, ParentName [FieldarentName] Use: Name Field ;Set as: $Name Storage: Parent Skip: yes [Field:AlterLedgerName] Use: Name Field ;Set as: $Name Storage: Name On:Focus: Yes: Set Field: "M-" + $$Value [Collection: RenameLedgers] Type : Ledger Fetch : Name, Parent
On Focus...it should call a Function..... and in the Function you should make the changes to attach the Prefix to the LedgerName.
Normally I try to use function for such replacements I am attaching a sample please see if it can be used. Regards,