Grid Table for Standard Grid Order Printing
The grid print templates for purchase order and sales order transactions contain the record.custbody_gridoe_productgrpdata field. This field contains the data for the grid table. Refer to the following information to learn more about this field.
JSON Code Snippet for Standard Grid Order Printing
The following JSON code snippet shows a sample 2x2 grid table from record.custbody_gridoe_productgrpdata:
[
{
"type": "MI",
"nameId": "2369",
"name": "Basic Crew Neck T-shirt",
"category": "Color, Size",
"rowattr": "custitem2",
"colattr": "custitem1",
"grid": {
"rowlabel": "Color",
"collabel": "Size",
"rowcollabel": "Matrix Item Option",
"header": [
{
"id": "Column1",
"colAttr": "1",
"name": "Small",
"percentage": "0.0"
},
{
"id": "Column2",
"colAttr": "2",
"name": "Medium",
"percentage": "0.0"
}
],
"data": [
{
"id": "Row1",
"rowattributeid": "1",
"rowattribute": "Red",
"rowpercents": 0,
"columnids": [
"Column1",
"Column2"
],
"columnpercents": [
0,
0
],
"Column1": {
"internalid": 4220,
"defaultpercent": 25
},
"Column2": {
"internalid": 4222,
"defaultpercent": 25
}
},
{
"id": "Row2",
"rowattributeid": "2",
"rowattribute": "Blue",
"rowpercents": 0,
"columnids": [
"Column1",
"Column2"
],
"columnpercents": [
0,
0
],
"Column1": {
"internalid": 4221,
"defaultpercent": 25
},
"Column2": {
"internalid": 4223,
"defaultpercent": 25
}
}
]
}
}
]
Sample 2x2 Grid Table Representation for Standard Grid Order Printing
For grid tables in standard grid order printing, consider the following details:
-
The index of the grid in
record.custbody_gridoe_productgrpdatais the same as the item's grid ID column in item sublist. -
The template may contain an empty
record.custbody_gridoe_productgrpdatafield. -
The template may contain an empty
{}entry member inrecord.custbody_gridoe_productgrpdata. If the entry member is empty, it means that the whole template and its items are deleted in item sublist.
The following table represents the sample JSON code into a 2x2 grid table in purchase order and sales order printouts.
|
Matrix Item Option
|
Small
|
Medium
|
|
Blue
|
Row 1 Col 1 Item ID:
|
Row 1 Col 2 Item ID:
|
|
Red
|
Row 2 Col 1 Item ID:
|
Row 2 Col 2 Item ID:
|
For information about the other elements included in Grid Print Templates, see the following topics: