You need to sign in to do that
Don't have an account?
111
how can i make DML operation was false for this object?
how can i get (!lsr.isSuccess()) == true?
and then i get the updateFlg = false;
now i can't get updateFlg = false;
OpportunityLineItem[] opportunityList
= BOpportunityLineItemDAO.selectOpportunityLineItem(mitoSakubanBef);
= BOpportunityLineItemDAO.selectOpportunityLineItem(mitoSakubanBef);
Database.SaveResult[] SR = database.update(opportunityList);
try{
for(Database.SaveResult lsr:SR){
//更新失敗の場合
if(!lsr.isSuccess()){
updateFlg = false;
break;
}
}
}catch (System.DmlException e) {
// DmlException例外は呼元へ投る
throw e;
}catch (System.Exception e) {
// SFDCシステム例外は呼元へ投る
throw e;
}
try{
for(Database.SaveResult lsr:SR){
//更新失敗の場合
if(!lsr.isSuccess()){
updateFlg = false;
break;
}
}
}catch (System.DmlException e) {
// DmlException例外は呼元へ投る
throw e;
}catch (System.Exception e) {
// SFDCシステム例外は呼元へ投る
throw e;
}