on 06-13-2017 10:58 AM
Hi,
I want from code to do in my form row ordering like is it working on Form Settings.
To do that you have to open form settings of any form. On table format pane you have rows which can be manually ordered. You have to hold left mouse button on a row and then you can reorder rows with your persolized requirement.
Below is link to film which present what I want to accomplish.
Any suggenstions?
Kind Regards
Sebastian
Hi Sebastian,
If you are familiarize with SAP Business One SDK, you can achieve this purpose with the FormPreferencesService object.
A sample:
SAPbobsCOM.CompanyService oCmpSrv = oCompany.GetCompanyService();
FormPreferencesService oFormPreferencesService = oCmpSrv.GetBusinessService(ServiceTypes.FormPreferencesService);
ColumnsPreferencesParams oColPreferencesParams = oFormPreferencesService.GetDataInterface(FormPreferencesServiceDataInterfaces.fpsdiColumnsPreferencesParams);
//form type
oColPreferencesParams.FormID = formType;
//user id (e.g manager= 1)
oColPreferencesParams.User = userID;
//get columns preferences
ColumnsPreferences oColsPreferences = oFormPreferencesService.GetColumnsPreferences(oColPreferencesParams);
//walk the among the columns
for (int j = 0; j <= oColsPreferences.Count - 1; j++)
{
//Find the column that you want - In this sample I want the column Item Number("1") from item content matrix ("38") on sales order form("139")
if (oColsPreferences.Item(j).Column == "1" && oColsPreferences.Item(j).ItemNumber == "38") //Find the column that you want - In this sample
{
//Update de position of the "Item Number" column
oColsPreferences.Item(j).TabsLayout = 2;
}
}
//Then, commit the changes.
oFormPreferencesService.UpdateColumnsPreferences(oColPreferencesParams, oColsPreferences);
Hope it helps.
Kind Regards,
Diego Lother
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
9 | |
8 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.