0
Garysund created
Hi There
I Extended the Jtable user list to include a new action ICompany Profile.
{
text: app.localize('CompanyProfile'),
visible: function (data) {
return data.record.id !== abp.session.userId;
},
action: function (data) {
abp.ajax({
url: abp.appPath + 'Mpa/CompanyAdmin/Index',
data: JSON.stringify({
userId: data.record.id
})
});
}
},
When I click on the action it steps into the controller and passes through the data correctly but when it tries to return the view it does nothing then gives an error. It does not log anything in the logs.
Controller
public async Task<ActionResult> Index(CompanyAdminModel input)
{
var businessUnits = await _documentFilterAppService.GetBusinessUnitsForCombobox();
var userid = input.UserId;
var UserCustomerNumbers = _customerNumberAppService.GetCustomerNumbersByUser(userid);
var userProfile = await _profileAppService.GetCompanyProfileForAdminEdit(userid);
var model = new IndexViewModel(businessUnits, UserCustomerNumbers, userProfile);
return View(model);
}
How to I go to a new view from a jTable action? Technically it would be leaving the user list page and going to the company profile page.
Thanks