If we use the same username and password for a single account and there are multiple business units how would we target a specific business unit?

For example, posting to a publication list via the c# api only seems to query one business unit. And if the list Id exist in another business unit it says the list does not exist


Okay, I'm new to this.... so I'm happy to be corrected.

If you don't specify the client - it will use the top level business unit... which I suspect is what you are getting.

To access all lists for parent and sub-accounts you need to specify.....

    RetrieveRequest MyRequest = new RetrieveRequest();
    MyRequest.ObjectType = "List";
    MyRequest.Properties = new string[] { "ID", "Description", "ListName", "Client.ID"};
    MyRequest.QueryAllAccounts = true;
    MyRequest.QueryAllAccountsSpecified = true; //scans all business units
    MyRequest.Filter = sfp;

to search a specific account you need to set the Client attribute....

eg Client.ID = business unit id

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.