Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagec#
themeRDark
titleC# - Get all account types from a BFS instance
linenumberstrue
//Use the GetAccountTypes method to get all AccountTypes in the BFS instance and write
//the information in the console
var client = new BFSServiceReference.bfsapiSoapClient();
var credentials = new BFSServiceReference.Credentials()
{
    UserName = bfsusername, //Username of administrative user in your instance of BFS
    Password = bfspassword, //Password of the administrative user in your instance of BFS
};
var accounttypes = client.GetAccountTypes(new BFSServiceReference.GetAccountTypeRequest()
{
    Credentials = credentials,
    identify = bfsidentifier, //Identifier is a unique token for your instance of BFS       
    Fields = new BFSServiceReference.GetAccountTypeFields()
    {
        BrickId = true,
        Key = true,
    },
});
foreach (var c in accounttypes.Result)
{
    Console.WriteLine(c.BrickId + "," + c.Key);
}
Code Block
languagec#
themeRDark
titleResult in console
linenumberstrue
83adad04-02db-4dae-a5da-50b15d5fedbc,CapitalInsuranceAccount
95e3bf07-3f18-4f35-9365-1a8339493e78,HouseAccountingAccount
9c296549-41c9-4aef-bd48-e9602584f098,IPSAccount
2848b95f-8bf4-462e-8db3-2020f049e184,HouseSystemAccount
4d639562-1234-4b05-ba97-f4da03542278,HoldingAccount
20af188c-f6be-4fb7-9ae1-9d579143ea32,InheritedIRAAccount
8364af96-6a26-45a9-8e8e-3a3eaf91029e,FundAccount
bc610399-c33f-4681-a443-8886947692d8,ISKAccount
f2fa06d2-ff2c-4d4a-9a21-cb77157f41c3,CounterpartyAccount
cdc125ed-78c6-41a0-b385-f253144539ed,HouseCustodyAccount

...