On successful deletion or cancellation of vouchers, the Function LastResult does not respond? Why?

Discussion in 'Knowledge Base' started by admin, May 17, 2013.

    
  1. admin

    admin Administrator Staff Member


    Query:
    Using Function LastResult can we identify the successful deletion or cancellation of vouchers?
    Solution:
    Presently, this is not possible using Function LastResult since the querybox appearing for deletion/ cancellation of vouchers is controlled by the platform. Function LastResult only responds to the success or failure of the last executed action within the current Function.
    For example, if a Function is invoked and action Delete Object is specified, the immediate $$LastResult will return Yes since Action Delete Object is executed successfully but there is a Query Box displayed by the Platform confirming for deletion, where user might have selected No. In such case, though the Object is not deleted or cancelled, we might end up getting a result Yes since the preceding Action Delete Object is executed successfully.
    To resolve this currently, we can make use of variables for updating the MasterIDs of the Vouchers being selected for deletion/cancellation. Once, the deletion/cancellation action is issued, one need to find the vouchers with Master IDs (from the variable) and if found, one can be assured that the Objects are not deleted else they are deleted.
     


Share This Page