I'm using the code below to set my Entra ID values. I'm using AbpExternalProviderOptions instead of WithDynamicOptions so I can set the Tenant ID in the web gui and then build the Authority URL. The values get set in the database but how do we retrieve the "EntraId" ExternalProviderDefinition so we can access those property values when setting the OpenIdConnection options when using ABP Pro?
` Configure(options => { options.Definitions.Add(new ExternalProviderDefinition { Name = "EntraId", Properties = new List { new ExternalProviderDefinitionProperty { PropertyName = "ClientId", IsSecret = false }, new ExternalProviderDefinitionProperty { PropertyName = "ClientSecret", IsSecret = true }, new ExternalProviderDefinitionProperty { PropertyName = "CallbackPath", IsSecret = false }, new ExternalProviderDefinitionProperty { PropertyName = "DisplayName", IsSecret = false }, new ExternalProviderDefinitionProperty { PropertyName = "Enabled", IsSecret = false },new ExternalProviderDefinitionProperty { PropertyName = "TenantId", IsSecret = false } } });
});`
What's the best way to set the value of a navigational property so the create and edit always have that value. Here's an example. I have a Dealership entity and a Leads entity. Leads has a required navigational property of DealershipId. Here's what I have working.
On the Dealerships razor page, I added and EntityAction.
<EntityAction TItem="DealershipDto" Visible="@CanEditDealership" Clicked="async () => await NavigateToLeads(context)" Text="@L["Leads"]"></EntityAction>
In Dealerships.Extended.razor.cs I added
private Task NavigateToLeads(DealershipDto dealership) { NavigationManager.NavigateTo($"/leads?DealershipId={dealership.Id}"); return Task.CompletedTask; }
Then in LeadsAppService.Extended.cs, I have
public async Task\<PagedResultDto> GetListByDealershipAsync(Guid dealershipId, PagedAndSortedResultRequestDto input)
{ var filterInput = new GetLeadsInput { DealershipId = dealershipId, Sorting = input.Sorting, MaxResultCount = input.MaxResultCount, SkipCount = input.SkipCount };
return await GetListAsync(filterInput);
}
This works and gives me a new button to add a lead filtered on the selected dealership.
I tried following the guide in this article but all I could get to work was add buttons not removing or editing.
#1: Is this the best way to do this or is there an obvious "ABP way" that I'm missing?
#2 If it is the best way, how do I disable/hide the default create button (New Lead below)?
#3 On create and edit, how do I hide/disable the Dealership selector as we don't want any chance of it being changed before saving.
The answer to #1 may make questions 2 and 3 moot. Thanks for any help.
John
If you Save and Generate a property with a default value, the value will be set on new entries as long as Required isn't checked. If Required is checked, the default value isn't populated when creating a new record. If you uncheck Required and Save and Generate, Default Value will again be set when creating a new record.
How do we hide columns? We have a few properties that are text areas with a lot of text. They blow up the datagrid so we want to hide them and only display them on separate Tabs when editing. With a Layered Application, what's the right way to set the visibility of those columns to hidden and then add those properties to their own tab when editing?
ABP Framework version: 0.9.22 UI Type: Blazor Server Database System: EF Core (SQL Server) Tiered (for MVC) or Auth Server Separated (for Angular)**: no Exception message and full stack trace: n/a Steps to reproduce the issue: n/a