How to disable modification entry following an action

SOLVED

Hi all,

Is there any possibility to disable ability of modification entry following an action?

In our case, we customize intersite transfer screen (GESSIS) by adding an export button to extract the data. We want to set a rule that after clicking export button, the entry cannot be modified

Does anyone have any idea about that?

Thanks for any help!

Parents Reply Children
  • 0 in reply to Nacho_Alferez

    Thanks

    I got the idea, but can you explain to me where should I add specific script?. Because I did check in Object action and Sage default doesn't allow me to modify or add specific script. Here's example of Sale invoice object (SIH). 

  • +1 in reply to Giang DINH
    verified answer

    Hi Giang:

    First thing you have to do is create the "SPESIH" process. Where can you do that? I use eclipse to write 4GL code, but in order not to make this answer complicated, just go to the path: Development -> Script dictionary -> Scripts -> Script editor.

    Type "SPESIH" in the "File name" field and then you can begin to write your code. As a template, the following code can be usefull for you:

    $ACTION
      Case ACTION
        When "AVANT_MOD" : Gosub AVANT_MOD
      Endcase
    Return

    $AVANT_MOD
      « Write your code »
    Return

    Don't forget to compile (the compile button does two things: save and compile the file). If it returns an error, correct the code.

    Remember that if you want to interrupt the modification of a record, you will have to set OK=0. Also, It would be helpfull if to set GPE=1, just to make sure we won't go through the standard SUBSIH process.

    And if you want to develop in X3, I recommend a training course.

    Thanks,

    Nacho Alférez.