When deleting a voucher from the sales register, i want to display a form that asks the user for a pin. Only if the entered pin is correct, the delete operation will be performed But i am unable to retain the context of the the voucher , and it shows that " voucher does not exist" [#Button : BottomToolBarBtn3_Delete] Action : Alter : User Pin1 [Report : User Pin1] Form : User Pin1 Object : Voucher : #vchfld [Form : User Pin1] Part : User Pin1 On:Form Accept: Yes : Delete Target [Part : User Pin1] Line : VchInfo, User Pin1 [Line : VchInfo] Field : Medium Prompt, vchfld Local : Field : Medium Prompt : Info : "Delete Vch No: " [Field : vchfld] Use : Name Field Set As : #User2 ;; MasterId [Line : User Pin1] Field : Medium Prompt, userpinField1 Password Local : Field : Medium Prompt : Info : "Enter PIN: " [Field : userpinField1 Password] Use : Name Field Set As : $$Value Control : InvalidPin : NOT $$Value="1234" OR $$IsEmpty:$$Value [Field : User2] Set As : $MasterId Set Always : Yes Invisible : Yes
Try To Create a Collection Where you will get that voucher using filter Example: [Collection: MyVoucher] Type: Voucher Fetch: Narration Filter: MyNarrationFilter [System: Formula] MyNarrationFilter: $Narration = "My Narration" Create a Function and walk through the collection and then delete the voucher Example: [Function: DeleteVouchers] 00 : Walk Collection: MyVoucher 10 : Set Target: .. 20 : Delete Target 30 : End Walk Hope This Helps
Initially it showed action execution failed at label 10 (Set Target)..When i commented that line, it shows invalid target..What do i give instead at label 10?
Example: [Function: DeleteVouchers] 00 : Walk Collection: MyVoucher 10 : Set Target 20 : Delete Target 30 : End Walk If Still It doesn't work then send me your updated code