Dear Forum, I want to Trigger Another function when we try ALT+D or ALT+x Requirement : to utilize the prompt result of Delete> yes/No or CANCEL >Yes/no Option to trigger another function. we use $$lastresult when we use querybox ,similary is it not possible to get the result of Delete or cancel yes or no option. Please help me by sharing your knowledge!
I think, we can modify the default button and put the ActionList instead of Action in first the default one happen, nad in IInd we cn write our own.
I had tried using Actionlist but the thing is we will not be able to store the response of Cancel or delete object , so if you have any better solution
Its not Posssible using Action List Becoz Delete Key is System Key So we dont Get $$LastResult From Key. But use Following Code Trick to achive your Requirement. Its Support only above Tally Release 3.3.Use Delete Key From Day Book. ;;============Code Start Here===================== [Variable : vLineMSID] Type : String [Variable : vLineDate] Type : Date [System : Variable] vLineMSID : "" vLineDate : "" [#Line : DSP VchDetail] Delete : Key : Delete Line Object Add : Key : New Delete Line Object On : Focus : Yes : Set : vLineMSID : $MasterID On : Focus : Yes : Set : vLineDate : $Date [Key : New Delete Line Object] Key : Alt+D Action : Call : Delete Line Object:##vLineMSID:##vLineDate Mode : Display Inactive : $$ISExploded OR NOT $$CanDelete [Function : Delete Line Object] Parameter : pDeleteMSID : String Parameter : pDeleteDate : Date 010 : Do If : ($$IsEmpty:##pDeleteMSID Or $$IsEmpty:##pDeleteDate) : Return 020 : Query Box : "Delete":Yes:No 030 : If : $$LastResult 040 : Call : DeleteWithXml 050 : MsgBox :"Delete Voucher": "Voucher Deleted \n Successfully" 060 : Else 070 : MsgBox : "Delete Voucher": "Voucher Not \n Deleted" 080 : END IF [Function : DeleteWithXml] 010 : Open File : "Delete.xml" : Text : Write 011 : Truncate File 020 : Write File Line : "<ENVELOPE>" 030 : Write File Line : "<HEADER>" 040 : Write File Line : "<VERSION>1</VERSION>" 050 : Write File Line : "<TALLYREQUEST>Import</TALLYREQUEST>" 060 : Write File Line : "<TYPE>Data</TYPE>" 070 : Write File Line : "<ID>Vouchers</ID>" 080 : Write File Line : "</HEADER>" 090 : Write File Line : "<BODY>" 100 : Write File Line : "<DESC>" 110 : Write File Line : "</DESC>" 120 : Write File Line : "<DATA>" 130 : Write File Line : "<TALLYMESSAGE>" 140 : Write File Line : "<VOUCHER DATE=" + @@StrDIC+$$String:##pDeleteDate+@@StrDIC+ " TAGNAME = " +@@StrDIC +"MasterID" + @@StrDIC+ " TAGVALUE="+@@StrDIC+$$String:##pDeleteMSID+ @@StrDIC +" ACTION="+@@StrDIC+"Delete"+@@StrDIC+">" 160 : Write File Line : "</VOUCHER>" 170 : Write File Line : "</TALLYMESSAGE>" 180 : Write File Line : "</DATA>" 190 : Write File Line : "</BODY>" 200 : Write File Line : "</ENVELOPE>" 210 : Close Target File 220 : SET : Import File : "Delete.xml" 230 : IMPORT : Vouchers : Yes [System : Formula] StrDIC : $$StrByCharCode:34 ;;; End of File Thanks, Azar Shaikh
SIR I WANT FIRST STOCK ITEM NAME AFTER THAT STOCK ITEM RATE OF VAT AND CLOSING STOCK while sales invoice entering. THANKING YOU SIR,