Hi Friends,
I added one customized button on sales order form action pane.
I want when i click on customized button then SALESLINE table SALESSTATUS should be change to Invoiced.
I am doing this by following code.
[ExtensionOf(FormDatasourceStr(SalesTable,SalesLine))]
final class SalesTabele_FormIBC_Extension
{
public void displayOption(Common _record, FormRowDisplayOption _options)
{
SalesLine salesline,saleslineloc;
FormDataSource fds = element.SalesLine_ds;
salesline = fds.cursor();
SalesTable SalesTable;
next displayOption(_record, _options);
select SalesTable where SalesTable.SalesId == salesline.SalesId;
if(salesline.RecId != 0)
{
ttsbegin;
select forupdate saleslineloc where saleslineloc.SalesId == salesline.SalesId;
saleslineloc.SalesStatus = SalesStatus::Invoiced;
saleslineloc.initFromSalesTable(SalesTable);
saleslineloc.doUpdate();
ttscommit;
}
}
}
By using this i can see status is changing in table but in form line status is not changing.
Please tell me how i can change in form.
Thaks & Regards
Rahul