Customers Subroutines
Customer master data - account info, credit, 0301 records
Subroutine count: 3
Table of Contents
VB_0301.REV1
Signature: SUBROUTINE VB_0301(CO,REQTYPE,CUSTNO,CREC,C1287REC,COEREC,ADDFLAG,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_0301.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | CRUD |
| Args | 8 |
| Description | Save or delete customer records across three tables (CUSTOMER, CUSTOMER.1287, CUSTOMER.OE) based on REQTYPE. On delete, soft-deletes (sets CUSTOMER.1287 field 4 to ‘Y’) and cleans up cross-reference tables CUSTXREF and REFXCUST. Audit trail via S0912. |
| Dangerous REQTYPE | DELETE, SAVE |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | REQTYPE | in | Request type: ‘DELETE’ to soft-delete and remove cross-refs, any other value to add/update |
| 2 | CUSTNO | in | Customer number (combined with CO to form record key) |
| 3 | CREC | in | Customer master record data as dynamic array (written to CUSTOMER table on save) |
| 4 | C1287REC | in | Customer 1287 record data as dynamic array (written to CUSTOMER.1287 on save) |
| 5 | COEREC | in | Customer OE record data as dynamic array (written to CUSTOMER.OE on save) |
| 6 | ADDFLAG | in | Add flag: true if adding a new record, false if updating existing |
| 7 | MESSAGE | out | Result message: ‘SAVED’ or ‘DELETED’ |
Tables Written: CUSTOMER, CUSTOMER.1287, CUSTOMER.OE, CUSTXREF, REFXCUST
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_0301.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": ""
}
}VB_CREDIT.REV1
Signature: SUBROUTINE VB_0304(CO,REQTYPE,CUSTNO,CREDITREC,ADDFLAG,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_CREDIT.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [WARN] dangerous |
| Pattern | CRUD |
| Args | 6 |
| Description | Save customer credit records to the CREDIT table. This subroutine only supports add/update operations (no DELETE branch); it always writes the credit record via MATWRITE with audit trail logging via S0911. |
| Dangerous REQTYPE | SAVE |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | REQTYPE | in | Request type (unused - no DELETE branch, always performs add/update) |
| 2 | CUSTNO | in | Customer number (combined with CO to form record key) |
| 3 | CREDITREC | in | Credit record data as dynamic array (written to CREDIT table on save) |
| 4 | ADDFLAG | in | Add flag: true if adding a new record, false if updating existing |
| 5 | MESSAGE | out | Result message: always ‘SAVED’ |
Tables Written: CREDIT
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_CREDIT.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"3": "",
"4": ""
}
}VB_CUSTOMER.REV1
Signature: SUBROUTINE VB_CUSTOMER(CO,REQTYPE,CUSTNO,CREC,C1287REC,COEREC,ADDFLAG,MESSAGE)
Source: S:\LinuxShare\pro3prog\VBBASE\VB_CUSTOMER.REV1
| Property | Value |
|---|---|
| Status | [+] analyzed |
| Safety | [COND] conditional |
| Pattern | CRUD |
| Args | 8 |
| Description | Save or delete customer records across three tables (CUSTOMER, CUSTOMER.1287, CUSTOMER.OE) based on REQTYPE. Nearly identical to VB_0301.REV1. On delete, soft-deletes and cleans up cross-reference tables CUSTXREF and REFXCUST. Audit trail via S0912. |
| Dangerous REQTYPE | DELETE, SAVE |
Arguments:
| Index | Name | Direction | Description |
|---|---|---|---|
| 0 | CO | in | Company number |
| 1 | REQTYPE | in | Request type: ‘DELETE’ to soft-delete and remove cross-refs, any other value to add/update |
| 2 | CUSTNO | in | Customer number (combined with CO to form record key) |
| 3 | CREC | in | Customer master record data as dynamic array (written to CUSTOMER table on save) |
| 4 | C1287REC | in | Customer 1287 record data as dynamic array (written to CUSTOMER.1287 on save) |
| 5 | COEREC | in | Customer OE record data as dynamic array (written to CUSTOMER.OE on save) |
| 6 | ADDFLAG | in | Add flag: true if adding a new record, false if updating existing |
| 7 | MESSAGE | out | Result message: ‘SAVED’ or ‘DELETED’ |
Tables Written: CUSTOMER, CUSTOMER.1287, CUSTOMER.OE, CUSTXREF, REFXCUST
API Call Example:
POST /api/admin/subroutine/call
{
"name": "VB_CUSTOMER.REV1",
"args": {
"0": "",
"1": "",
"2": "",
"3": "",
"4": "",
"5": "",
"6": ""
}
}Last updated: 2026-02-05 11:29 PM