I had this question a few days ago and it did pique my interest as it is an area I have some knowledge of, but little real world experience. My initial thought was that it would need some custom code, but as it turned out was a little simpler than I thought (once I worked out what I needed to do!)
Before we get into the details, let me just say that I am not a developer, so although my solution achieves the goal, it may not follow best practise and there may be alternative/better solutions to achieve the same aim.
Business Objective
Modify the “Purchase Orders to Sign”, which is part of the “Purchase Workflow” dashboard on the home page, to add a new custom field that is added to the Purchase Order table.
Steps to take
These steps were taken on 2022 R4 (V12 Patch 32)
Login as ADMIN, connect to SEED folder
- Setup my custom column and populate with some data
a. Create a new activity code to protect my changes.
Navigate to Development, Data and Parameters, Development Setup, Activity codes
b. Add custom column to table.
Navigate to Development, Data and Parameters, Tables, Tables
Query back table PORDER
Add new ZDES column and protect with activity code
Save and validate this change
c. Add custom column to Purchase Order entry screen
Navigate to Development, Script dictionary, Screens, Screens
Query back screen POH0
Add new ZDES column and protect with activity code
Save and validate this change
d. Update workflow rule
I need to update the POHSIG workflow rule for two reasons, (1) As the “Purchase Orders to Sign” representation is driven off the AWRKHISSUI workflow table I need to pass the custom field data in the context and (2) for my specific setup I only have ADMIN user so need to remove the actions section (this second part is not documented as it only applies for my specific setup)
Navigate to Parameters, Workflow, Workflow rules
Add new ZDES column
Save, then validate this change
e. Check/change parameter values
I need to make sure I will trigger the signature workflow by setting the appropriate parameters.
Navigate to Parameters, General parameters, Parameter values
Select ACH “Purchasing”
SEED folder
APP "Signature management" group
Configure company parameters
Add company GB10 values
Click OK, then Save
f. Logout and login again, to ensure all changes are picked up
g. Create new Purchase Order
Navigate to Purchasing, Orders, Orders
Select ALL transaction entry code
Create NEW order
Purchasing Site: GB011
Supplier: GB057
Custom Desc: Test text
LINES
Product: ASS001
Qty Ordered: 1
CREATE
h. Check results in SQL
select ZDES_0, *
from SEED.PORDER
where POHNUM_0 = 'POGB0110041';
Select AWS_.*
From SEED.AWRKHISSUI AWS_
Where AWS_.CODWRK_0 <> 'POHSIGNCR'
And AWS_.FLGSIG_0 = 3
And AWS_.DEST_0 = 'ADMIN'
And ( 'POHSIG' IN (AWS_.CODEVT_0, AWS_.CODWRK_0) )
Order by AWS_.CHRONO_0,AWS_.DEST_0;
If we scroll across for the second SQL, we see the context values, with the custom field data stored in VALCTX8
- Modify the home page gadget
For the modification itself, I want to identify which menu item is being used, so can check the representation I need to change:
We can see the PO just created is listed but doesn’t yet have the custom field added to it.
This gadget being displayed here is the menu item code: STD_X3_ERP_TCWPOHTOSIG
a. Review Menu Item
Navigate to Administration, Authoring, Pages, Menu items
Query back STD_X3_ERP_TCWPOHTOSIG
We can see the menu item comprises Representation TCWPOHTOSIG
b. Change class
Navigate to Development, Data and Parameters, Classes, Classes
Query back PORDER
Add custom property ZDES to “Properties” protected by the Activity Code
Save, Validate then run Global Validate
c. Edit Representation
Navigate to Development, Data and Parameters, Classes, Representations
Query back TCWPOHTOSIG
Add two entries in the “Available properties” protected by the Activity Code
Add new lines at line 2 (QUERY section) and at line 15 (HEADER section), as shown below:
IMPORTANT: You can’t see from the screen shot, but also need to make the following changes from defaults:
- line 2 (QUERY) make sure you set “Query” flag to “Yes”
- line 15 (HEADER) make sure you set “Detail” flag to “Yes”
Save, Validate, then run Global Validation
d. Logout then login again
e. Check results
You can now see the “Custom Desc” column with the text showing in the “Purchase Orders to Sign”
If I then go to the details for the record I can also see the text on the header screen
Conclusion
As you saw from the above steps, once you understand from where the data is coming, the steps are relatively straight-forward. Hopefully this document will help you in a project of your own, feel free to leave comments below if you find it useful or not.