on 07-14-2014 1:15 PM
Hi Experts,
I have small requirements in AdvanceListPanel. I have custom BO as mention below,
businessObject Demo {
element ID : ID;
node Sporoduct [0,n] {
element P_ID : ProductID;
element P_DES : SHORT_Description;
element P_QTY : Quantity;
element P_NET : Amount;
}
}
I have attached the OVS on Product ID (P_ID) element.
I want to auto-fill the details under the AdvanceListPanel ( Product Desc , Product Net value ( Price) )
1) How to get the details of Product ( Prod Descr, Product Price etc ).
Please anyone have idea about this share your thoughts.
Many Thanks,
Mithun
Hi, Mithun
What you want is to auto-fill the related details when you select a product from your OVS.
That means you have to write your codes in Event After Modify.
We normally use QueryByElements or some other query options given for a particular standard BO.
It would be like that.
var query=Product.QueryByElements;
var selParams=query.CreateSelectionParams();
selParams.Add(query.ProductID ,"I","EQ",this.P_ID );
var result=query.Execute(selParams);
for(var product in result){
this.P_DES =product.Description;
}
What I have just written is just a sample code. You have to find the exact name of the attributes of a standard BO in Repository Explorer.
Hope this helps,
Fred.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Fred,
Thanks for your reply....
I tried but there is no any Query like QueryByElement but there is query exist "QueryByDescription" with parameter ProductID and Description.
I have tried using this code but it gives the error " Query does not exist".
prod = Material.QueryByDescription();
Can you please tell me the other way to retrieve the product details?
Many Thanks,
Mithun
Hi Fred,
Additional Question on the same topic.
Is it possible to Return multiple values from OVS using OVS outport ? In OVS outport we can bind more than one field I guess. In this case from the calling view (could be QC or EC) how do we read the Outport of OVS.
Thanks a lot for this discussion
Regards
Ganesh
Hi Fred,
My query is same as yours.
I want to get Product price and Product description based on Product ID.
in run time i am not able to get description and price details.
var QueryMaterial = Material.QueryByDescription; | |
var SelectionParams = QueryMaterial.CreateSelectionParams(); | |
SelectionParams.Add(QueryMaterial.ProductID.content, "I", "EQ", this.InternalID); | |
var QueryResult = QueryMaterial.Execute(SelectionParams); | |
var product_price; | |
var count = QueryResult.Count(); |
foreach ( instance in QueryResult )
{ | ||
this.Description = instance.Common.Description; | ||
//product_price = instance.; | |
this.product_Price.currencyCode = instance.Common.product_Price.currencyCode; | |
this.product_Price.content = instance.Common.product_Price.content; |
Can you please give me the solution?.
Regards,
Vijay.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.