on 11-19-2017 9:51 PM - last edited on 02-04-2024 2:05 AM by postmig_api_4
Hi,
i'm new to this SAP B1 SDK.....
was doing a sample project... and had to write the below code.
SAPbouiCOM.EditText oEditCustomerCode = (SAPbouiCOM.EditText).Items.Item(enControlName.CustomerCode).Specific;
But i cant get enControlName. Is that because i forgot to add any specific lbrary function or something. Pls help me with it.
Hi Royin Rufeesh,
"enControlName" is nothing just a value type or you can say an struct. Here is how you can define it:
private struct enControlName
{
public const string Code = "3";
public const string Name = "5";
public const string ProjectCode = "7";
}
Basically, the idea to use it is that you can have the unique ids of the items on the form in a struct and later you can reference it anywhere instead of repeating unique id everywhere.
So now, you can use either one of the way:
1. SAPbouiCOM.EditText oEditCode = (SAPbouiCOM.EditText).Items.Item(enControlName.Code).Specific;
2. SAPbouiCOM.EditText oEditCode = (SAPbouiCOM.EditText).Items.Item("3").Specific;
Hope it helps!
Kind regards,
ANKIT CHAUHAN
SAP SME 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 |
---|---|
86 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.