Grid Line Deletion

SOLVED


Hi,

i want to add in validation once click 'Delete' in the Grid/Table but before the line of record remove.

if the validation = 'False', the line of record remine unchange

i have been trying many time but still not able to get 'Delete' onclick function.



Please Help and thank you.

Parents
  • 0

    Could you perhaps give me a bit more information?

  • 0 in reply to Duane Chemaly

    Thanks Duane Chemaly for reply.

    Yes, i working with 4GL.

    First, once i click on 'Delete' at grid detail, system will check whether the record has been attached / used by other document or records.
    if yes, system will terminate the delete action and prompt user that the record has been applied to other document.

    example : 
    i have a 'Warehouse ABC' as Header.
    i have 'Product A', 'Product B', 'Product C' as Detail (Grid) belongs to Warehouse ABC.

    if i try to delete 'Product B' in the grid, system will check 'Product B' is attached to any invoices. If yes, the delete action terminate.


    therefore, my question is, how do i apply the checking at onclick 'Delete' in Grid Detail, which action should i use?
    i have tried on AVANT_MOD, it seem can't work properly in my current work.



    Hope to hear from you soon.

    Thank you.

  • +1 in reply to destan
    verified answer

    Hi Destan,

    What you need to do is check if the status value = 65 when it fires in APRES_MODIF and then use mkstat = 1 to stop the transaction. Here is a short example also dont forget to set your button list back in the SETBOUT sub. Let me know if you are happy with this?

    $APRES_MODIF

    If status = 65

    Infbox "Error"

    mkstat = 1

    Endif

    Return

Reply
  • +1 in reply to destan
    verified answer

    Hi Destan,

    What you need to do is check if the status value = 65 when it fires in APRES_MODIF and then use mkstat = 1 to stop the transaction. Here is a short example also dont forget to set your button list back in the SETBOUT sub. Let me know if you are happy with this?

    $APRES_MODIF

    If status = 65

    Infbox "Error"

    mkstat = 1

    Endif

    Return

Children