Skip to Content

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

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Jan 26, 2017 at 07:55 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 30, 2017 at 07:59 AM

    Thanks a lot pramodh.

    Its really helps me :)

    Add comment
    10|10000 characters needed characters exceeded