This creates a new local user account object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | var accountsService = new dundas.account.AccountService(); var account = new dundas.account.Account(); account.accountType = dundas.account.AccountType.LOCAL_USER; account.id = "2f3224b1-9484-4a84-8963-d6172743a9ef" ; account.name = "MyUserAccount" ; account.displayName = "MyDisplayName" ; account.emailAddress = "myemailaddress@dundas.com" ; account.password = "1234" ; accountsService.createAccount(account) .done( function (account) { var viewService = new dundas.view.ViewService(); viewService.showSignal( "Success" ); BindAccountsList(); } ) .fail( function (error) { var viewService = new dundas.view.ViewService(); viewService.showSignal( "Failure" ); viewService.showError(error); } ); |