on 2017 Mar 10 3:55 PM
Hello Experts,
I've added the extension field ExoToBeSentViaEDI:Indicator to PurchaseOrder object using SDK. I activated the change in ExtPurchaseOrder.xbo object.
Now I would like to be able to query the PurchaseOrder using my new field: ExoToBeSentViaEDI. Unfortunately, the new extension field doesn't show up in the list of available objects which give the possibility to limit the query results:
var query = PurchaseOrder.QueryByElements;
var selectionParams = query.CreateSelectionParams();
selectionParams.Add(query. after ctrl+space I've expected to see my extension field here
,"I","EQ","true");
Do you know what I'm doing wrong?
Or maybe it is just not possible to achieve?
Best Regards
Piotr Kowalski
Request clarification before answering.
Fred, thank you very much again 🙂
It works indeed.
If you could take a look at one more thing.
Why changing the value of the extended field in ABSL doesn't take effect:
var query = PurchaseOrder.QueryByElements;
var selectionParams = query.CreateSelectionParams();
selectionParams.Add(query.ExoToBeSentViaEDI_BHQ7O8J0U6CKCS20MCR06HO3R,"I","EQ",true);
var resultData = query.Execute(selectionParams);
foreach(var po in resultData){
// the first way I've tried:
po.ExoToBeSentViaEDI = false;
// the second way I've tried:
PurchaseOrder.Retrieve(po.UUID).ExoToBeSentViaEDI = false;
}
Both ways don't make any effect. It means, that the extension field ExoToBeSentViaEDI doesn't change, it still stays as True.
As a complementary information here is how I set the field to True:
I've created BO extension and in Event-BeforeSave event, I've added this code:
import ABSL;
this.ExoToBeSentViaEDI = true;
It just changes the value of ExoToBeSentViaEDI extension field to True whenever the user changes something in the PurchaseOrder.
Is it the possibility to add something like commit/save command for the changes to take effect?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
97 | |
11 | |
10 | |
9 | |
6 | |
6 | |
4 | |
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.