on 11-15-2015 7:23 AM
Hi all,
I have a script in the BeforeSave event under sales quote root.
I would like to pull some data from a contact related to the quote's account.
I can get the contact id from the buyer party, however, there is no other data in this section which can be helpful for me.
(mainly, I want to access some extension fields i created in KUT)
I guess I should link the BP BO to the Sales Quote BO in some way, but I don't know how.
any ideas?
Thanks,
Dror.
Hi Dror,
You can access directly to the involved parties of the sales quote. There is a way to take the corresponding Customer by RoleCode.
var BuyerParty = this.Party.Where(w=>w.RoleCode=="8").GetFirst().Party.Customer;
if this is not the field, can you attach an Screenshot?
Thx.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dror,
First you need to check the KUT fields you need to access from a contact, using .ref item
Second you can use below query for buyer party or similar query to pull the data.
var query2 = Customer.QueryByIdentification;
var resultData2;
var selectionParams2 = query2.CreateSelectionParams();
selectionParams2.Add(query2.UUID.content, "I", "EQ", this.ToRoot.BuyerParty.PartyUUID.content);
resultData2 = query2.Execute(selectionParams2);
Regards,
Ajith
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.