List budgets
Shows the code and name of all budgets of the company, or of the budgets that match a pattern.
Budgets come from the Finder with type BDS. budgets()->search() returns a CodeNameSearch with BudgetSummary objects (code, name). For the amounts of a budget, use Budget vs. actual.
$twinfield = Example::twinfield();
// Optional search pattern from the command line, e.g. `2025*`.$pattern = $argv[1] ?? '*';
foreach ($twinfield->budgets()->search($pattern)->all() as $budget) { echo $budget->code, ' ', $budget->name, PHP_EOL;}Search in names only with ->inName(), or get one page with ->limit(10)->get().
php examples/budgets/list-budgets/example.phpphp examples/budgets/list-budgets/example.php "2025*"Add TWINFIELD_DEBUG=1 to see the SOAP request and response.
001 Budget 2025002 Forecast 2025Source
Section titled “Source”View examples/budgets/list-budgets/example.php on GitHub.
Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.