I want to suppress some PO suggestions Generate PO using BPM BO.POSugg.Generate Method

I want to suppress some PO suggestions Generate PO using BPM BO.POSugg.Generate Method


However, BO.POSugg.Generate Method, the SugPoDtl row now has no data even though I have chosen the Pre method.

When PO generated from PO Suggestions, PO Suggestions will be deleted. Here I want to block PO Suggestions when marked in Checkbox02. Is there any solution to intervene when PO Suggestions generated PO?


BO.POSugg.Generate Method does not retrieve data lines when processed by the mothod

Switch to Customization of the Purchase Order Suggestion Entry screen(App.POSuggEntry.POSuggEntryForm)
usage of baseToolbarsManager

private void baseToolbarsManager_ToolClick(object sender, Infragistics.Win.UltraWinToolbars.ToolClickEventArgs args)
	{
		if(args.Tool.Key=="GenerateTool")
		{	
            DataView dView=grdList.DataSource as DataView;
			DataTable _table=dView.ToTable();
            foreach (DataRow r in _table.Rows)
			{
				DataRow editRow=null;
				if(Convert.ToBoolean(r["Buy"])==true)
				{
                    if (Convert.ToBoolean(r["CheckBox02"])==true && Convert.ToInt32(r["ReqNum"])>0)
					{
						throw new Ice.BLException("DMS-Customization: Req "+ Convert.ToInt32(r["ReqNum"]) +" PartNum: "+r["PartNum"]+" Close on SuggPO not create PO!\n Please Open Req On SuggPO!");
					}
                 }
               }
       }
}

I’m not sure if there’s any other place to create a PO from a PO Sugg other than Generate from the New PO Suggestions screen.
Thank you very much! Have a good day! :smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

Generate is going to be hard to get in front of. I do not try to stop POs, but on Posugg.GetRowsPlant I do some checks and set row rules for colors when they should not buy.

You could also check on POSugg.Update if Buy was checked and uncheck it or stop it. If Buy is not checked then generate will not make a PO.

1 Like

We replaced the menu item via customization with our own and call our own custom process to do it. I couldn’t find a way to utilize the BO in place either. Those processes are some ugly black boxes.

3 Likes

instead of blocking the po generation, can you try to block the checkbox from being checked? SHould be possible with a data BPM, and flip off the checkbox if it is every flipped on.

1 Like

Thank you all!
I used void baseToolbarsManager_ToolClick to check if the data line is ticked buy and if checkbox02 is True then PO will not be created
I want to open the Attachents feature of the New PO Suggestions screen?

:smiling_face_with_three_hearts: :smiling_face_with_three_hearts:

1 Like