i am using following script to export the selected accounts, but when i hit this script from url, it export all the account from database, instead of exporting only that account whose id is ‘992bed4d-78ca-eb2b-296e-5b67de826ff9’
public function action_testExport() {
$ids = "";
$db = \DBManagerFactory::getInstance();
$bean = BeanFactory::getBean('Accounts');
$where = array('id' => array('992bed4d-78ca-eb2b-296e-5b67de826ff9'));
$result = $db->retrieve($bean, $where);
while ($row = $db->fetchByAssoc($result)) {
$ids .= $row["id"] . ",";
}
$ids = rtrim($ids, ",");
if ($ids) {
$_POST["entryPoint"] = 'export';
$_POST["uid"] = $ids;
$_POST["module"] = 'Accounts';
$_POST["action"] = 'index';
require_once './export.php';
}
}