[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Create, Approve and Activate a saving account in one click action

Hi All,
Am trying to simply account creation process by doing 3 actions (create,
approve and activate) in just one mouse click.

Below is my sample process by it creates the account in 'submitted and
pending approval' state (100) and throws error that parameter e.g command
is not supported. Please any assistance will be appreciated.

resourceFactory.savingsResource.save(this.formData, function (data) {*
* //Get savings account details for next group of actions*
* resourceFactory.savingsResource.get({accountId: data.savingsId,
associations: 'all'}, function (data) {*
*                                                scope.accountId =
* var params = {accountId: scope.accountId, note: 'Savings Account
Approval', approvedOnDate: '2018-08-30', command: 'approve'};*
* resourceFactory.savingsResource.save(params, function (data) {*
* // Approve Account*

* var param2 = {accountId: scope.accountId, activatedOnDate: '2018-08-30',
command: 'activate'};*
* resourceFactory.savingsResource.save(param2, function (data) {*
* //Activate Account*
* });*
* });*
* });*
* });*

Ippez Robert