generate_xpp_template
WHEN: writing an extension or customization -- generates ready-to-use X++ code. Triggers: 'génère un CoC', 'crée une extension', 'generate extension', 'write a CoC class', 'event handler pour', 'template pour'. Uses REAL metadata from the KB (actual field names, method signatures). 'coc' = Chain of Command class, 'table_extension' = extend table with fields/methods, 'event_handler' = pre/post event handler, 'job' = runnable class, 'find_method' = find/exist pattern. ALWAYS call get_object_details first to verify the object exists.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"templateType": "<templateType>",
"objectName": "<objectName>"
},
"name": "generate_xpp_template"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| methodName | No | Optional: specific method name for CoC or event handler templates | |
| objectName | Yes | The base object, e.g. 'SalesTable', 'VendInvoiceJour' | |
| templateType | Yes | Template type: 'coc', 'table_extension', 'event_handler', 'job', 'find_method' |