How To Remove Disable Cancel Shipment Functionality In Enter Purchase Order and Purchase Order Summary Forms
منع المستخدم من إستخدام إمكانية إلغاء شحنة علي أمر توريد تم الإستلام عليها من علي شاشة ملخص أوامر الشراء ومن شاشة إدخال أوامر التوريد
How to remove disable and cancel shipment functionality in enter purchase order and purchase order summary forms
1. How To Remove Disable And Cancel Shipment Functionality In Enter Purchase Order and Purchase Order Summary
Forms
Purpose : How To Remove Disable / Cancel Shipment Functionality In Enter Purchase Order and Purchase Order Summary
Forms
For Purchase Order Summary Form:-
1. Go to Purchase Orders Summary form > query for a PO > after the header of the PO is shown , go to > (M) Help >Diagnostics > Custom
Code > Personalize. the Form Personalization open...
2. Function Name = PO_POXPOVPO Form Name = POXPOVPO Debug Mode = Off
Follow next steps:-
Seq = 1
- Description = Disable Cancel PO
- Level = Function - Enable is checked.
2. Condition tab: -
Trigger Event = WHEN-VALIDATE-RECORD
- Trigger Object = PO_DOCON_CONTROL
- Condition =
:PO_DOCON_CONTROL.ACTION in ('CANCEL PO SHIPMENT','CANCEL') AND :SHIPMENTS_FOLDER.QUANTITY_RECEIVED>0
- Processing Mode = Both
In tab Condition in zone Context can chose level= User and select users for which this restriction to be available
Actions tab: -
Seq = 1 - Type = Message
- Message Type = Show
- Message Text = 'You can not cancel the Shiment.'||' '
||' اليمكنإلغاءهذهالشحنةألنهتماألستالمعليهافعليا '||' '
||' الكميةالمستلمةعليهذهالشحنةهي '||' '||CHR(10)||(${item.shipments_folder.quantity_received.value})||'
'||(${item.shipments_folder.unit_meas_lookup_code_tl.value})
- Seq = 2
- Type = Property
- Language = All
- Enabled is checked
- Object Type = Item
- Target Object = PO_DOCON_CONTROL.ACTION
- Property Name = VALUE
- Value = Leave it blank.
3. - Save
2. Open the Purchase Order Summary form and click Tools --> Control , select Cancel PO , User will get error message as entered above.
4.
5. 3. for other cancel functionality that you want to disable from CONTROL
you may use the sql to check.
select lookup_code from po_lookup_codes where lookup_type = 'CONTROL ACTIONS';
the returned lookup_code that you can add like the followings:
- Condition = :PO_DOCON_CONTROL.ACTION in ( 'CANCEL PO' ,'
'CANCEL PO LINE' , 'CANCEL PO SHIPMENT','CANCEL') ;
6. For Purchase Order Entry Form:-
1. Go to Purchase Orders form
go to > (M) Help >Diagnostics > Custom Code > Personalize. the Form Personalization open...
Function Name = PO_POXPOEPOForm Name = POXPOEPO Debug Mode = Off
Follow next steps: -
-Seq = 10
- Description = Disable Cancel PO Shipment from Tools menu
- Level = Function
- Enable is checked.
Condition tab:-
- Trigger Event = Special13
- Condition = :PO_SHIPMENTS.QUANTITY_RECEIVED>0
- Processing Mode = Both
7. Actions tab: -
Create action to display a message.
-Seq = 1
- Type : Message
- Message Type: Show
- Message Text :
'You can not cancelthe Shiment.'||' '
||' اليمكنإلغاءهذهالشحنةألنهتماألستالمعليهافعليا '||' '
||' الكميةالمستلمةعليهذهالشحنةهي '||' '||CHR(10)||(${item.PO_SHIPMENTS.quantity_received.value})||'
'||(${item.PO_SHIPMENTS.unit_meas_lookup_code_tl.value})
- Seq = 2
- Type = Property
- Object Type: View
- Property Name: VISIBLE
- Value: False
This will disable the Special Menu Cancel.
Save your work and exit.
8. Open the Purchase Order form , query a PO and click Tools --> Cancel - User will get error message as entered above.