Activities of "liangshiwei"

Answer

:)

Answer

It works for me:

[ControllerName("JournalVoucherLine")]
[Route("api/mainAccounting/JournalVoucherLine")]
public class JournalVoucherLineController : AbpController
{
    [HttpGet]
    [Route("getAccountLookup")]
    public async Task<PagedResultDto<AccountResultDto>> GetAsync()
    {
        return new PagedResultDto<AccountResultDto>(2, new List<AccountResultDto>
        {
            new AccountResultDto() { DisplayName = "Test", Id = Guid.NewGuid() },
            new AccountResultDto() { DisplayName = "Test2", Id = Guid.NewGuid() }
        });
    }
}

public class AccountResultDto
{
    public string DisplayName { get; set; }

    public Guid Id { get; set; }
}
 <select asp-for="Account.AccountId"
        class="auto-complete-select"
        data-autocomplete-api-url="/api/mainAccounting/JournalVoucherLine/GetAccountLookup"
        data-autocomplete-display-property="displayName"
        data-autocomplete-value-property="id"
        data-autocomplete-items-property="items"
        data-autocomplete-filter-param-name="filter"
        data-autocomplete-allow-clear="true">
</select>

Answer
<select asp-for="Account.AccountId"
    class="auto-complete-select"
    data-autocomplete-api-url="/api/mainAccounting/JournalVoucherLine/GetAccountLookup"
    data-autocomplete-display-property="displayName"
    data-autocomplete-value-property="id"
    data-autocomplete-items-property="items"
    data-autocomplete-filter-param-name="filter"
    data-autocomplete-allow-clear="true">
</select>
  • data-autocomplete-display-property is the displayName not items.displayName
  • data-autocomplete-value-property is the id not items.id
  • data-autocomplete-items-property is the items

Hi,

ABP and ASP.NETCore does not have a solution for this scenario, you can check the discussion here https://stackoverflow.com/questions/62263805/asp-net-core-3-1-web-api-authorization-on-model-property-level

Hi,

It's a problem, we will fix it in the next RC version

You can check the document

https://docs.abp.io/en/commercial/latest/startup-templates/microservice/interservice-communication

okay

:)

Answer

I can only give this advice because I don't know the details of your project. Thanks for your understand.

You can refer to the ABP code https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Public.Web/Pages/Public/CmsKit/Blogs/Index.cshtml#L42-L45

https://github.com/abpframework/abp/blob/dev/modules/cms-kit/src/Volo.CmsKit.Public.Application/Volo/CmsKit/Public/Blogs/BlogPostPublicAppService.cs#L64

Answer

Hi,

Try:

<select asp-for="Account.AccountId"
    class-"auto-complete-select"
    data-autocomplete-api-url="/api/mainAccounting/JournalVoucherLine/GetAccountLookup"
    data-autocomplete-display-property="accountName"
    data-autocomplete-value-property="accountId"
    data-autocomplete-items-property="accounts"
    data-autocomplete-filter-param-name="filter"
    data-autocomplete-allow-clear="true">
 </select>

Make sure the /api/mainAccounting/JournalVoucherLine/GetAccountLookup endpoint return result is correct

Showing 1881 to 1890 of 6693 entries
Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.1.0-preview. Updated on October 30, 2025, 06:33