Hi Experts
I am using below code to confirm SO via X .
How can i tell that the below code has actually confirmed the SO so that i can set a boolean ret to true only if it has been confirmed .
Is there any out of box feature to check if order was confirmed successfully , if not then i guess the only way is to check custconfirmjour table like below. Please suggest if any other/better way available.
Class myclass
{
public static boolean confirmSO(Salestable _salestable)
{
boolean ret;
salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation);
custconfirmjour custconfirmjour1,custconfirmjour2;
select firstonly ConfirmId,SalesId ,CreatedDateTime from custConfirmJour1
order by CreatedDateTime desc
where custConfirmJour1.SalesId == salesTable.SalesId;
salesFormLetter = SalesFormLetter::construct(DocumentStatus::Confirmation);
salesFormLetter.update(salesTable, DateTimeUtil::getSystemDate(DateTimeUtil::getUserPreferredTimeZone()), SalesUpdate::All);
select firstonly ConfirmId,SalesId, CreatedDateTime from custConfirmJour2
order by CreatedDateTime desc
where custConfirmJour2.SalesId == salesTable.SalesId;
if( custConfirmJour2.ConfirmId > custConfirmJour1.ConfirmId )
{
ret = true;
}
return ret
}
}
Thanks
Mav