Dear Experts Please Help When I import ledger with 2 or 3 Allias its imported successfully but problem is in bellow img Code: ;;;;Part of code 125 : New Object : Ledger 126 : Set Value : Name : $Name 127 : Set Value : Parent : $$ReportObject:$$CollectionFieldByKey:$Parent:$Name:SmpGroupLedgers C09 : INSERT COLLECTION OBJECT : Name C10 : Set Target : Name C11 : If:NOT $$isempty:##SKCLedAlias1 C12 : SET VALUE : Name :##SKCLedAlias1 C13 : END IF C14 : Set Target:.. C15 : INSERT COLLECTION OBJECT : Name C16 : Set Target : Name C17 : If:NOT $$isempty:##SKCLedAlias2 C18 : SET VALUE : Name :##SKCLedAlias2 C19 : END IF C20 : Set Target:.. It Should be in below img
;;Try This Code: [Function: Amit1] 125 : New Object : Ledger ; 126 : Set Value : Name : "Amit" 127 : Set Value : Parent : "Capital Account" AJ1 : Insert Collection Object : LANGUAGENAME AJ2 : Set Value : LANGUAGEID : @@EnglishLanguageId C09 : INSERT COLLECTION OBJECT : Name C10 : Set Target : Name C11 : If:True C12 : SET VALUE : Name :"Amit" C13 : END IF C14 : Set Target:.. C15 : INSERT COLLECTION OBJECT : Name C16 : Set Target : Name C17 : If:True C18 : SET VALUE : Name :"Jalan" C19 : END IF C20 : Set Target:.. AJ100 : Create Target
Replace Code: AJ1 : Insert Collection Object : LANGUAGENAME AJ2 : Set Value : LANGUAGEID : @@EnglishLanguageId with Code: AJ1 : Set Target : LANGUAGENAME Language is already created with name(Name = LANGUAGENAME[0].NAME[0]) Inserting LANGUAGENAME collection object again creates another LANGUAGENAME object which is not desired.
Code: 125 : New Object : Ledger ;126 : Set Value : Name : $Name 127 : Set Value : Parent : $$ReportObject:$$CollectionFieldByKey:$Parent:$Name:SmpGroupLedgers AJ1 : Set Target : LANGUAGENAME ;AJ2 : Set Value : LANGUAGEID : @@EnglishLanguageId C03 : INSERT COLLECTION OBJECT : Name C04 : Set Target : Name C06 : SET VALUE : Name :$Name C08 : Set Target:.. C09 : INSERT COLLECTION OBJECT : Name C10 : Set Target : Name C11 : If:NOT $$isempty:##SKCLedAlias1 C12 : SET VALUE : Name :##SKCLedAlias1 C13 : END IF C14 : Set Target:.. C15 : INSERT COLLECTION OBJECT : Name C16 : Set Target : Name C17 : If:NOT $$isempty:##SKCLedAlias2 C18 : SET VALUE : Name :##SKCLedAlias2 C19 : END IF C20 : Set Target:.. C21 : INSERT COLLECTION OBJECT : Name C22 : Set Target : Name C23 : If:NOT $$isempty:##SKCLedAlias3 C24 : SET VALUE : Name :##SKCLedAlias3 C25 : END IF C26 : Set Target:..
Please provide solution for import ledger master with 2 or more allias or want to alter already created ledger with 2 or more allias Is there any other way
First repair the data or use backup data before trying old code. next since we cannot use default language name collection object that is created, we can delete it, use Insert Collection object and set language id (don't forget to set first name in language name as actual name of ledger) For alter also use same technique in Backend
Code: [Function : TC_CreateLedgerFunc] 125 : NewObject : Ledger 126 : Set Value : Name : "Test Ledger" 127 : Set Value : Parent :"Sundry Debtors" 127D : DELETE COLLECTION OBJECT: LanguageName 128 : Insert Collection Object : LanguageName 128B : Set Value : LANGUAGEID : @@EnglishLanguageId 129 : Insert Collection Object : Name 130 : Set Target : Name 131 : Set Value :Name:"Test Ledger" 132 : Set Target :.. 133 : Insert Collection Object : Name 134 : Set Target : Name 135 : Set Value :Name:"Alias1" 136 : Set Target :.. 137 : Insert Collection Object : Name 138 : Set Target : Name 139 : Set Value :Name:"Alias2" 140 : Set Target :.... ;150 : Log Target : TgtObj.txt C2sdfd1 : Create Target
follow this if issue exists after that uncomment ;150 : Log Target : TgtObj.txt and share TgtObj.txt along with full code you used
Following code is for importing Name and also multiple alise & working fine Code: 000 : SET : Counter : 0 001 : START PROGRESS : ($$NumItems:codewiseFilter) : "Importing Master" : @@CmpMailName : "Importing Party Ledger ..." ;+ $$NewLine + $$String:($$NumItems:VCHLVExcellVariableBillWise)+$$String:"/"+$$String:##Counter 030 : Walk Collection:codewiseFilter 31 : Set:MasterCode1:$MasterCode 036 :Set:VlStatecode:($$StringPart:$PartyGSTn:0:2) 037 : Set :ExcelCompanyState:@@ExcelCompanyState 038 :Set:ExcelstateName:@@ExcelstateName 060 : IF :$$IsEmpty:$Name:Ledger:##MasterCode1 070 : NEW OBJECT : Ledger 043 : Set Value : Name : $PartyName +" ("+ ##MasterCode1+ ")" 120 : Set Value : Parent : "Sundry Debtors" 130 : Set Value : GSTRegistrationType : if $$IsEmpty:$PartyGSTn or $PartyGSTn = "NO" Then "Unregistered" else "Regular" 140 : Set Value : PartyGSTIN : if $$IsEmpty:$PartyGSTn or $PartyGSTn = "NO" then "" else $PartyGSTn 150 : Set Value : CountryofResidence : "India" 160 : Set Value : LedStateName : if $$IsEmpty:##ExcelstateName then ##ExcelCompanyState else ##ExcelstateName 170 : Set Value :IsBillWiseOn :"No" 180 : Walk Collection:PartyFilter ;181 : Log:"Before insert collection" + $PartyName 190 : Insert Collection Object: Name :LanguageName : First 200 : Set Value:Name:$PartyName ;210 : Log:$PartyName 220 : Set Target:... 230 : End Walk 240 : CREATE TARGET 250 : END IF 260 : INCREMENT : Counter 270 : SHOW PROGRESS : ##Counter 280 : End Walk 290 : END PROGRESS ;101 : Msg Box: "Party Ledger Auto Creation !!!":"Party Ledger Master Imported Successfully !!!" 300 : RETURN