Friday, 14 October 2011

Delete Operation in oaf...when we pressing the delete icon in the page

In the CO type the following:

//"delete" is the Event raised when you press the Delete Icon in Invoice
//So check if the Delete icon has been pressed.

else if ("delete".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))
//get the Unique Row Reference for the Row on which the Even has been
String lineRefId = (String)pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Serializable [] param={lineRefId};
//Call the AM method deleteInvoiceLine to delete the Invoice Lines

In the AM type the following

//method in the AM
public void deleteInvoiceLine(String lineRefId){
//Find the LineVORowImpl using the Unique Row
// Reference
LineVORowImpl lineRow = (LineVORowImpl)findRowByRef(lineRefId);


Finally commit to save the changes to the database


  1. Hi Santhosh,

    String lineRefId = (String)pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);

    This part of the line in my code is returning null when clicked on Delete button(Image style). Please let me know the alternatives for this.