Skip to Content
0

Filter Sales Org and Sales Office based on Customer dynamically in SDK C4C

Jan 25, 2017 at 08:12 AM

90

avatar image
Former Member

Hi,

My requirement is - Get the list of Sales Org and Sales Office which are associated to Customer, and display them in respective fields in QC. Created new custom BO.

Ex: If Customer ID (Account) 1234 has 3 Sales Org added. In Sales Org field in the QC, should get display only those 3 sales org. If Customer ID 09800 has 2 Sales Org then only 2 sales Org should display.

Please help me with sample code, as I'm new to SDK C4C.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Pramodh Patil
Jan 26, 2017 at 07:55 PM
0

Hi

In Account, sales org and sales office is under the association SalesArrangement.

First retrieve account based on the internal ID.Traverse to salesArrangment, loop through and get the Sales data

for ex:

var customer = Customer.Retrieve(this.AccountID);
var salesArrangement = customer.SalesArrangement;
var salesOrg;
foreach (var salesArr in salesArrangement){
	salesOrg = salesArr.SalesOrganisation_V1.ID;
		//you can add logic to add to custom BO instance
}

Thanks

Pramodh

Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member Jan 30, 2017 at 07:59 AM
0

Thanks a lot pramodh.

Its really helps me :)

Share
10 |10000 characters needed characters left characters exceeded