Hello All, I wish to retrieve Value from Ledger in Multiaddress List and display same (on sales invoice) but something is wrong in the formula and I am unable to find same. Code: Set as: $(Ledger, #EIBuyer).LedMultiAddressList[1,($AddressName = #EIBuyerAddressType)].PhoneNumber + ", " + $(Ledger, #EIBuyer).LedMultiAddressList[1,($AddressName = #EIBuyerAddressType)].MobileNumber Please help
Formula might be correct...but will not work if used in a different environment. As per your above formula...u r referring to #EIBuyer and #EIBuyerAddressType Fields..... but if you are using this formula in your own field and in a different report, it might not work, even if the formula is right. On the assumption, that you are using it in a Sales Invoice.......try to use........ SET AS : @@RequiredAddress [System : Formula] SameLedAddrType : $AddressName = #EIBuyerAddressType RequiredAddress : $(Ledger, $PartyLedgerName).LedMultiAddressList[1, @@SameLedAddrType].PhoneNumber + ", " + $(Ledger, $PartyLedgerName).LedMultiAddressList[1, @@SameLedAddrType].MobileNumber If above does not work... replace $PartyLedgerName with ##LedgerName
Sir, Thanks, It worked like charm... I do have one more issue, and want same address (without typing again) in case ledger is cash. I wrote following function, but it only copies first line... (in all lines) Code: [Function : FxRef] Variable : vIsSales : Logical Variable : vNumber : Number Variable : vCountSource : Number : $$NumItems:BasicBuyerAddress Variable : vCountTarget : Number : $$NumItems:Address 100 : Set: vIsSales : @@IsSales 110 : If : ($$IsCashLedger:$PartyLedgerName and ##vIsSales and Not $$IsObjectExists:Ledger:#EIBuyer) 120 : SET : vNumber : 1 121 : WHILE : ##vCountSource >= ##vNumber 123 : IF : ##vCountTarget >= ##vNumber 124 : SET TARGET : Address[##vNumber]. 125 : ELSE 126 : INSERT COLLECTION OBJECT: Address 127 : END IF 128 : SET VALUE : Address : $$CollectionField:#EIBuyerAddress:##vNumber:BasicBuyerAddress 129 : SET TARGET : .. 130 : INCR : vNumber 131 : END WHILE 140 : END IF Please advice Thanks Again!