Generation of purchase order when request signed.

SUGGESTED

We would like to have purchase orders automatically generated when a purchase request has been signed / validated. However, struggling to implement this process.

Looked into workflows, signatures, copying the action behind the order button that is on the Purchase request window with no luck.

My understanding is that this is nonstandard X3 functionality however would like to remove the manual process of a purchaser having to enter the request and click the order button.

Hoping someone might be able to help? 

Parents
  • 0
    SUGGESTED

    Hi Chris. I haven't tried Aziz's suggestion, please share with us if it worked for you and how (I mean if you added it to an entry point or to the screen of PSH via an SPE).

    Because the method I have used (an entry point) has a problem. It only works if the user signs the Purchase request inside the GESPSH. Entry point in object PSH:

    #<AdxTL>@(#)8.0.0.0 $Revision$ 
    ####################################################################################
    # Script            : ZAUTOCCE  (to atutomatically generate PO as soon as signed!) #
    # Creation date     : 10/05/2023                                                   #
    # Version           : 1.0.0                                                        #
    # Authors (Company) : Empowerion - Victor Nia                                      #
    # Module            : Purchase                                                     #
    # ---------------------------------------------------------------------------------#
    ####################################################################################
    $ACTION
    Case ACTION
      When "APRES_CRE"        : Gosub APRES_CRE
      When "APRES_MOD"        : Gosub APRES_MOD
    
      When Default
    Endcase
    Return
    #####################################
    $APRES_MOD
    Gosub APRES_CRE
    Return
    #######################
    $APRES_CRE
    
    If !clalev([F:ZPSH]) : Local File PREQUIS [F:ZPSH] : Endif
    Read [F:ZPSH]PSH0=[F:PSH]PSHNUM
    If [F:ZPSH]APPFLG > 2
    	Call TRTPSHGEN From TRTACHPSH1
    	Gosub PSH_UPDATE
    Endif
    
    Gosub PSH_UPDATE
    
    Return 

    Then to overcome the issue of signing Purchase request via dashboard or email (and not via GESPSH), I have setup a manual workflow which is running every 1 minute to convert the PSH to POH. But I am sure there should be a better way to convert PSH to POH no matter which way is it signed. 

Reply
  • 0
    SUGGESTED

    Hi Chris. I haven't tried Aziz's suggestion, please share with us if it worked for you and how (I mean if you added it to an entry point or to the screen of PSH via an SPE).

    Because the method I have used (an entry point) has a problem. It only works if the user signs the Purchase request inside the GESPSH. Entry point in object PSH:

    #<AdxTL>@(#)8.0.0.0 $Revision$ 
    ####################################################################################
    # Script            : ZAUTOCCE  (to atutomatically generate PO as soon as signed!) #
    # Creation date     : 10/05/2023                                                   #
    # Version           : 1.0.0                                                        #
    # Authors (Company) : Empowerion - Victor Nia                                      #
    # Module            : Purchase                                                     #
    # ---------------------------------------------------------------------------------#
    ####################################################################################
    $ACTION
    Case ACTION
      When "APRES_CRE"        : Gosub APRES_CRE
      When "APRES_MOD"        : Gosub APRES_MOD
    
      When Default
    Endcase
    Return
    #####################################
    $APRES_MOD
    Gosub APRES_CRE
    Return
    #######################
    $APRES_CRE
    
    If !clalev([F:ZPSH]) : Local File PREQUIS [F:ZPSH] : Endif
    Read [F:ZPSH]PSH0=[F:PSH]PSHNUM
    If [F:ZPSH]APPFLG > 2
    	Call TRTPSHGEN From TRTACHPSH1
    	Gosub PSH_UPDATE
    Endif
    
    Gosub PSH_UPDATE
    
    Return 

    Then to overcome the issue of signing Purchase request via dashboard or email (and not via GESPSH), I have setup a manual workflow which is running every 1 minute to convert the PSH to POH. But I am sure there should be a better way to convert PSH to POH no matter which way is it signed. 

Children