cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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.

Accepted Solutions (0)

Answers (2)

Answers (2)

0 Kudos

Thanks a lot pramodh.

Its really helps me 🙂

former_member240914
Participant
0 Kudos

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