Starts in:
1 DAY
21 HRS
14 MIN
32 SEC
Starts in:
1 D
21 H
14 M
32 S

Activities of "Shoba24"

public async Task <IActionResult> OnPostAsync() {
	var files = Documents;
	var purchaseOrder = PurchaseOrder;
	purchaseOrder.StatusName = _settings.StatusSetting.Open;
	//Validate
	var validateResult = purchaseOrder.Validate();
	if (!validateResult.IsSuccess) {
		throw new UserFriendlyException("Model is not valid");
	}

	foreach(var fileExtension in files) {
		if (!fileExtension.ContentType.Contains("pdf") && !fileExtension.ContentType.Contains("doc") && !fileExtension.ContentType.Contains("docx") && !fileExtension.ContentType.Contains("msword")) {
			throw new UserFriendlyException("File is not in valid format");
		}
	}
	var result = await _purchaseOrdersAppService.CreateAsync(PurchaseOrder);

	if (files != null && files.Count() > 0) {
		foreach(var file in files) {
			var documentsPath = _blobStorage.UplodPurchaseOrderFile(file, result.Id).Result;
			var documentInput = new DocumentCreateDto {
				FileName = file.FileName,
				FilePath = documentsPath,
				FileSize = (int) file.Length,
				FileType = file.ContentType,
				RecordId = result.Id,
				TypeName = _settings.DocTypeSetting.PurchaseOrder
			};
			await _documentAppService.CreateAsync(documentInput);
		}
	}
	return Redirect("/PurchaseOrders");
}

Hi, we use this user friendly exception.Still got error like this

Hi EngincanV,

we want to validate and display corresponding error message on this create and edit page.

In pop up modal, we used to validate like this

and its working fine in pop up modal.

But in create/edit page ,it doesn't work well..

We get error like this

we need to display like this

Hi berkansasmaz,

Again not working...state dropdown not listing values..

But API returns a value

Thanks..Working fine!

Hi berkansasmaz,

As u mentioned ,we already add one extra property ADDRESS to organization unit

Now we want to add navigation property STATE to ORGANIZATION UNIT

I referred this ticket https://support.abp.io/QA/Questions/295/Extending-Abp-entities-by-adding-navigation-properties to add STATE to ORGANIZATION UNIT

2021-09-30 14:55:57.166 +05:30 [INF] Request starting HTTP/2 GET https://localhost:44395/Identity/OrganizationUnits/CreateModal - - 2021-09-30 14:55:57.198 +05:30 [INF] Authorization was successful. 2021-09-30 14:55:57.199 +05:30 [INF] Executing endpoint '/Identity/OrganizationUnits/CreateModal' 2021-09-30 14:55:57.204 +05:30 [INF] Route matched with {page = "/Identity/OrganizationUnits/CreateModal", action = "", controller = "", area = ""}. Executing page /Identity/OrganizationUnits/CreateModal 2021-09-30 14:55:57.204 +05:30 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2021-09-30 14:55:57.212 +05:30 [INF] Executing handler method CustomApp.Web.Pages.Identity.OrganizationUnits.CreateModalModel.OnGetAsync - ModelState is "Valid" 2021-09-30 14:55:57.221 +05:30 [INF] Start processing HTTP request GET "https://localhost:44356/api/app/states/state-lookup?SkipCount=0&MaxResultCount=1000&api-version=1.0" 2021-09-30 14:55:57.221 +05:30 [INF] Sending HTTP request GET "https://localhost:44356/api/app/states/state-lookup?SkipCount=0&MaxResultCount=1000&api-version=1.0" 2021-09-30 14:55:57.485 +05:30 [INF] Received HTTP response headers after 263.966ms - 200 2021-09-30 14:55:57.485 +05:30 [INF] End processing HTTP request after 264.1222ms - 200 2021-09-30 14:55:57.502 +05:30 [INF] Executed handler method OnGetAsync, returned result . 2021-09-30 14:55:57.502 +05:30 [INF] Executing an implicit handler method - ModelState is "Valid" 2021-09-30 14:55:57.502 +05:30 [INF] Executed an implicit handler method, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. 2021-09-30 14:55:57.644 +05:30 [INF] Executed page /Identity/OrganizationUnits/CreateModal in 440.066ms 2021-09-30 14:55:57.644 +05:30 [INF] Executed endpoint '/Identity/OrganizationUnits/CreateModal' 2021-09-30 14:55:57.645 +05:30 [INF] Request finished HTTP/2 GET https://localhost:44395/Identity/OrganizationUnits/CreateModal - - - 200 - text/html;+charset=utf-8 479.8264ms 2021-09-30 14:55:57.972 +05:30 [INF] Request starting HTTP/2 GET https://localhost:44395/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-100.woff2 - - 2021-09-30 14:55:57.974 +05:30 [INF] The file /Themes/Lepton/Global/assets/fonts/poppins-v6-latin-100.woff2 was not modified 2021-09-30 14:55:57.974 +05:30 [INF] Request finished HTTP/2 GET https://localhost:44395/Themes/Lepton/Global/assets/fonts/poppins-v6-latin-100.woff2 - - - 304 - font/woff2 1.8371ms 2021-09-30 14:57:00.944 +05:30 [INF] Request starting HTTP/2 POST https://localhost:44395/Identity/OrganizationUnits/CreateModal application/x-www-form-urlencoded;+charset=UTF-8 314 2021-09-30 14:57:00.976 +05:30 [INF] Authorization was successful. 2021-09-30 14:57:00.976 +05:30 [INF] Executing endpoint '/Identity/OrganizationUnits/CreateModal' 2021-09-30 14:57:00.976 +05:30 [INF] Route matched with {page = "/Identity/OrganizationUnits/CreateModal", action = "", controller = "", area = ""}. Executing page /Identity/OrganizationUnits/CreateModal 2021-09-30 14:57:00.976 +05:30 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2021-09-30 14:57:01.010 +05:30 [INF] Executing handler method CustomApp.Web.Pages.Identity.OrganizationUnits.CreateModalModel.OnPostAsync - ModelState is "Valid" 2021-09-30 14:57:01.041 +05:30 [ERR] ---------- RemoteServiceErrorInfo ---------- { "code": null, "message": "An internal error occurred during your request!", "details": null, "data": {}, "validationErrors": null }

2021-09-30 14:57:01.044 +05:30 [ERR] Missing type map configuration or unsupported mapping.

Mapping types: Object -> OrganizationUnitCreateDto System.Object -> Volo.Abp.Identity.OrganizationUnitCreateDto AutoMapper.AutoMapperMappingException: Missing type map configuration or unsupported mapping.

Mapping types: Object -> OrganizationUnitCreateDto System.Object -> Volo.Abp.Identity.OrganizationUnitCreateDto at lambda_method2159(Closure , Object , OrganizationUnitCreateDto , ResolutionContext ) at Volo.Abp.AutoMapper.AutoMapperAutoObjectMappingProvider.Map[TSource,TDestination](Object source) at Volo.Abp.ObjectMapping.DefaultObjectMapper.AutoMap[TSource,TDestination](Object source) at Volo.Abp.ObjectMapping.DefaultObjectMapper.Map[TSource,TDestination](TSource source) at CustomApp.Web.Pages.Identity.OrganizationUnits.CreateModalModel.OnPostAsync() in E:\Backup\CustomApp\src\CustomApp.Web\Pages\Identity\OrganizationUnits\CreateModal.cshtml.cs:line 56 at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Convert[T](Object taskAsObject) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.ExecutorFactory.GenericTaskHandlerMethod.Execute(Object receiver, Object[] arguments) at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeHandlerMethodAsync() at Microsoft.AspNetCore.Mvc.RazorPages.Infrastructure.PageActionInvoker.InvokeNextPageFilterAsync() 2021-09-30 14:57:01.049 +05:30 [INF] Executing ObjectResult, writing value of type 'Volo.Abp.Http.RemoteServiceErrorResponse'. 2021-09-30 14:57:01.051 +05:30 [INF] Executed page /Identity/OrganizationUnits/CreateModal in 74.9738ms 2021-09-30 14:57:01.051 +05:30 [INF] Executed endpoint '/Identity/OrganizationUnits/CreateModal' 2021-09-30 14:57:01.051 +05:30 [INF] Request finished HTTP/2 POST https://localhost:44395/Identity/OrganizationUnits/CreateModal application/x-www-form-urlencoded;+charset=UTF-8 314 - 500 - application/json;+charset=utf-8 107.1342ms

Yes we also already tried this ,we get internal error on post.

  • ABP Framework version: v4.4.2
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes
  • Exception message and stack trace:
  • Steps to reproduce the issue:"

Hi,

we have added state entity to organization unit by referring this https://support.abp.io/QA/Questions/295/Extending-Abp-entities-by-adding-navigation-properties

Now we want to override organization unit create/edit page to display StateLookupList ?

Yes,when we will meet?

Showing 31 to 40 of 85 entries
Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06