Page 1 of 1

Grid Inserted

Posted: Fri Apr 19, 2024 4:02 pm
by nabilahasna

Hai

I Try to put this script on table specific->common->grid inserted

// Grid Inserted event
function Grid_Inserted($rsnew)
{
    $id=$this->id_good->CurrentValue;
    $data1 = $rsnew["amount"];
    ExecuteUpdate("UPDATE good SET stock= '$data1' where id_good=".$this->id_good->CurrentValue);
    $this->setSuccessMessage("Update success.....");
}

but stock wont change after record inserted
any advice?

Thanks


Re: Grid Inserted

Posted: Fri Apr 19, 2024 5:07 pm
by mobhar

Try to use $rsnew["id_good"] instead of $this->id_good->CurrentValue.