cancel
Showing results for 
Search instead for 
Did you mean: 

How to set card detail in payment means matrix

former_member743465
Discoverer
0 Kudos

I'm trying to set the card detail in payment means window which is received from pos.

I have tried the below code

oMatrix.Columns.Item("63").Cells.Item("1").Specific.value="1234"

But i'm getting invalid row index. I have hard coded the row index as 1. As the each column has only one index.

Could you please help me on this.

Thanks in advance.

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Dear akumarsapds,

Could you please share a screenshot about the form where you are trying to set the data using UI API?

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

former_member743465
Discoverer
0 Kudos

Thanks ankit for your response.

I have marked where i'm trying to set the last 4 digits of credit card.

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi akumarsapds,

Following code is working fine for me:

if (pVal.FormType == 146 && pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED && pVal.ItemUID == "5" && pVal.BeforeAction == false)
            {
                try
                {
                    SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)Program.SBO_Application.Forms.GetForm(pVal.FormType.ToString(), pVal.FormTypeCount);
                    SAPbouiCOM.Folder oFL = (SAPbouiCOM.Folder)oForm.Items.Item("5").Specific;
                    oFL.Select();
                    SAPbouiCOM.Matrix oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("112").Specific;
                    SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oMatrix.Columns.Item("63").Cells.Item(1).Specific;
                    oEdit.Value = "5678";
                }
                catch(Exception ex)
                {                    
                }                
            }

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

Answers (0)