Skip to Content
0
Sep 22, 2014 at 11:38 AM

UI API Copy From

195 Views

Hi guys I'm trying to use the UI API to simulate the pressing of the "Copy From" button from the AR Invoice form. I want to select "Copy From Sales Orders". I have tried and when I do it the "List of Sales Orders" Window appears. When the user presses "choose" however, something strange happens. Instead the "Draw Document Wizard" appearing the AR Invoice just finds another Invoice. Here is my code:

int copyData = globals.SBO_Application.MessageBox("Customer has open Sales Orders. Would you like to copy data from these Sales Orders?", 1, "Yes", "No", "");

if (copyData == 1)

{

oItem = oARInvForm.Items.Item("10000330"); //Copy From button

//oItem.Click(BoCellClickType.ct_Regular);

oCombo = (SAPbouiCOM.ComboBox)(oItem.Specific);

oCombo.Select(1, BoSearchKey.psk_Index);

}

Can someone please help with this?