on 2021 Dec 16 10:53 AM
I have a choose from that I created with screen painter that I use on a matrix. I have an issue when I add row for this specific column. The CFLs for Item code and name hold their values but the BP Catalog No. CFL value disappears when I add a new row.
How do I make the CFL not lose its value?
Below is a screenshot of the CFL and link button definition

Here is the code for setting the values:
#region For BP catalog no.<br>if (oDataTable.UniqueID == "CFL_BPCat")<br>{<br> if (oDataTable != null)<br> {<br> SOEntities _db = new SOEntities();<br> using (_db)<br> {<br> bpCatalog = System.Convert.ToString(oDataTable.GetValue(2, 0), null);<br><br> itemCode = _db.OSCNs.Where(x => x.Substitute == bpCatalog).Select(y => y.ItemCode).FirstOrDefault();<br><br> if (itemCode != null)<br> {<br> itemName = _db.OITMs.Where(x => x.ItemCode == itemCode).Select(y => y.ItemName).FirstOrDefault();<br><br> _itemNo.ValueEx = itemCode;<br> _itemDesc.ValueEx = itemName;<br> _bpCatalog.ValueEx = bpCatalog;<br> }<br><br> oIMatrix.SetLineData(pVal.Row);<br> }<br> }
}
private void ClearItemMatrix()<br> {<br> _itemNo.ValueEx = "";<br> _itemDesc.ValueEx = "";<br> _bpCatalog.ValueEx = "";<br> _quantity.ValueEx = "0";<br> ....<br> }
How do I fix this problem? I clear fields with the method ClearItemMatrix() before add row even so as not to have values repeat on bottom row. Is this the way to do it?
_bpCatalog.ValueEx is a userdatasource
Any help appreciated,
Help others by sharing your knowledge.
AnswerRequest clarification before answering.
Hi kinyanjui.kamau,
Can you try to use the method GetLineData() as suggested in SAP Note 2408856 and share the result with us?
Kind regards,
ANKIT CHAUHAN
SAP Business One Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 22 | |
| 19 | |
| 14 | |
| 9 | |
| 6 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.