on 07-25-2016 6:38 PM
Hello Experts,
I have a program which works on validate event of warehouse field on Sales Order. It changes a udf value based on warehouse selection.
But a strange thing is happening for few users when they select warehouse, the warehouse cfl pops up again. This happens only when the add-on is running and it doesn't happen for all the users.
Any suggestion would help.
Below is the piece of code :
if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_VALIDATE && pVal.FormTypeEx == "139" && pVal.Action_Success == true && (oForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE || oForm.Mode == SAPbouiCOM.BoFormMode.fm_UPDATE_MODE))
{
if (pVal.ItemUID == "38" && (pVal.ColUID == "11") && pVal.InnerEvent == false)
{
if (mAltUm.GetCellSpecific("U_ActComm", pVal.Row).value != Details[0][3].ToString())
{
mAltUm.SetCellWithoutValidation(pVal.Row, "U_ActComm", Details[0][3]);
}
}
}
Thanks
Shiv
Hi Pandey,
Shouldn't the UDF be changed only after the warehouse has been selected? If so you need to check pVal.BeforeAction == false.
Pedro Magueija
If this answer is helpful or correct, marking it as such is a form of saying thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Pedro for your reply. Though the entire could is in pVal.BeforeAction==false.
Yes UDF changes after the warehouse has been selected, but for some reason the cfl for warehouse selection pops-up again after the warehouse is selected and displayed in Warehouse column. And if the user selects the warehouse again by mistake, strange things happen.
Has someone experienced this before?
I have never seen this behavior before. So just wanted to check what is the cause of this. I have SBO 9.1 PL10.
Thanks
Shiv
Hi Danilo,
There is not other WHS CFL.
Also the warehouse cfl pops up once. But even after selecting the warehouse, the data gets filled into warehouse column and then again WH cfl pops-up.
Just to update you, I my add-on fills in a UDF based on Warehouse/ItemCode/Quantity columns on Validate Event.
Thanks
Shiv
I had something similar with another CFL a long time ago, but that time, I think the problem was with multiples similar names as I said before if you have "Warehouse1" and "Warehouse2" and you only set the beginning as "Warehouse" but it is not your case.
No idea what is happening. Anyway, I would try to use in another form and another events in a different project, maybe there is something else in your add-on.
I did an example here and I didn`t get any issue
if (pVal.Before_Action == false && pVal.FormTypeEx == "139" && pVal.EventType == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && pVal.ColUID == "24" && pVal.ItemUID == "38")
{
SAPbouiCOM.Form oForm = (SAPbouiCOM.Form)SBO_Application.Forms.Item(FormUID);
Matrix oMtx = (Matrix)oForm.Items.Item("38").Specific;
oMtx.SetCellWithoutValidation(1, "U_Test", "AAA");
}
User | Count |
---|---|
96 | |
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.