Get Bill to Address from BP (not added)

SabineK

Hello together,


 


is there a possibility to get a value of a field from the Bill to Address on the Business Partner Address Pane?


Because at the moment I need this value the Business Partner is not added so I have to select the Form Value.


 


At the moment, I use:


 


string BP_Country = Matrix.GetFromUID(pVal.Form, "178").GetValue("8", row);


 


But if the last Address was the Ship to Address, I get the Country of the Ship to Address.


 


How can I select the Bill to Address or focus the row of Item 69?


 


Regards


Sabine


Manuel Kuebler

1. Click on the address on the left side


2. GetValue of Country


 


string BP_Country = Matrix.GetFromUID(pVal.Form, "178").GetValue("8", 0);

SabineK

Yes, but how to click via optimizer on the left side of the address name?


Anders Olsson

Hi Sabine,


 


First you will have to go through the matrix (69) to determine which row you want to highlight. Then click on it.


 


Example:


int row = 3; // Row number (zero based). This is just an example

Matrix matrix = Matrix.GetFromUID(pVal.Form, "69");

matrix.Columns["20"].Cells[row].Click(SwissAddonFramework.UI.Components.MatrixColumn.ClickTypes.Regular, SwissAddonFramework.UI.Components.MatrixColumn.Modifier.None);

 

Regards,

Anders

SabineK

Thanks.


 


This Code works:


 


Matrix AddressNames = pVal.Form.Items["69"] as Matrix;

 

 AddressNames.Columns["20"].Cells[1].Click(SwissAddonFramework.UI.Components.MatrixColumn.ClickTypes.Regular, SwissAddonFramework.UI.Components.MatrixColumn.Modifier.None);

 


 


Regards


Sabine


0

Comments

0 comments

Please sign in to leave a comment.

Didn't find what you were looking for?

New post