0

Good Day!

I have a file PropertyMaint which inherits the InventoryItemMaint.

I also created a custom page on which its TypeName is the PropertyMaint.

Everything runs smoothly but when I am trying to upload an image file in the Attributes TAB, an error occurs, on which supplied fields are being asked again.

These are the steps to reproduce the error:

  • STEP 1 : Create a new item.
  • STEP 2 : Fill up all the required fields. (General settings, Price/Cost and GL Accounts TAB)
  • STEP 3 : Go to the Attributes Tab, add any images by clicking Browse, choose any image and click Upload.
  • STEP 4 : Click the save button and the error occurs.

Does anyone experienced the similar error I am experiencing?

STEP 1 & 2 - General Settings --- Screenshot

STEP 1 & 2 - GL Accounts --- Screenshot

STEP 3 & 4 - Browse image, save and error --- Screenshot

Code Files

LINK ---->>> Page link

LINK ---->>> PropertyMaint link

LINK ---->>> InventoryItemExtension link

I am currently using the Acumatica 2018 R2 version with the Build 18.202.0029.

I am still new in using the Acumatica framework so any advice and help is very appreciated. Thank you so much

UPDATE 12-14-2018 I checked the persist method of the graph, and I noticed that there are no NULL values on the fields that requires values, the error still occurs.

view values screenshot 1

UPDATE 12-26-2018 The null/empty error still occurs even if I'm just updating a record from my page using my inherited graph. But when I do an undo, the record can be updated again. Are there any way on extending graphs or inheriting them?

Linnaire
  • 61
  • 9
  • It seems like there is an attempt to insert an empty InventoryItem record. If you look at the cache in the persist you might have 2 inserts. One for your record and 1 for some empty record. You would need to look at when the empty is getting into the cache – Brendan Dec 13 '18 at 19:31
  • Hello @Brendan, So to speak, I need to override the persist method of the acumatica? Just to check whether the values are null or not? correct me if i have mistake in understanding your point. But I'll look into it and try your suggestion. Thank you so much for the suggestion. – Linnaire Dec 14 '18 at 00:09
  • I am under the impression, that if I have extended the InventoryItem DAC, i don't need to touch the persist method of the InventoryItemMaint. But I'll be taking your advice in checking the persist method of the inventoryitem maint to check whether there are null values being inserted in the system. Thanks! – Linnaire Dec 14 '18 at 00:16
  • you could also try to use the base graph (InventoryItemMaintBase) as the InventoryItemMaint inherits from. And yes i was just pointing out that there seems like there are 2 rows being inserted. One of those rows might be all nulls – Brendan Dec 14 '18 at 14:23
  • Although looks like InventoryItemMaintBase is empty so not going to provide much. i would look into what is causing the 2nd insert (or nulling out your fields) – Brendan Dec 14 '18 at 14:38
  • Hi @Brendan, I was looking into the debug, and i tried clicking the Upload button then save, it triggers Updating and Inserted events. Which probably triggers the null values. I also tried by overriding the persisted method, but to no avail it ddnt solve the issue. – Linnaire Dec 26 '18 at 01:31
  • I checked the persisted method, and checked the views that contains the values, but there are no null values on the views. – Linnaire Dec 26 '18 at 01:46

2 Answers2

0

Inheritance of graph in Acumatica should be accomplished in the following way:

PropertyMaint : PXGraphExtension<InventoryItemMaint>
Yuriy Zaletskyy
  • 4,983
  • 5
  • 34
  • 54
  • This would be the correct way for extending the existing graph, but to make a new page you would want to use a new graph. – Brendan Dec 13 '18 at 19:27
  • Just from personal experience, when I've made inheritance from existing graph, and got into issues, Acumatica support told me that I should follow T200 and T300 manuals, which doesn't have samples of inheritance from the graph. Did they change their policy and now allow to make inheritance and support it? – Yuriy Zaletskyy Dec 13 '18 at 21:19
  • 1
    Hello @YuriyZaletskyy, I've also tried using the PXGraphExtension but still it generates the same error whenever I tried uploading the image file and clicking the save button. Also, I want to say thank you. Your blogs helps me a lot. – Linnaire Dec 14 '18 at 00:22
  • For extending a graph a graph extension should be used. But this is different if creating a new graph. From experience having the same graph and multiple pages causes issues with access rights (but this was back in 5.X versions). Ideally you would want a unique graph per page – Brendan Dec 14 '18 at 14:26
0

I solved my problem by deleting the Example.cs file. The file contains an InventoryItemMaintExtension on which i assume that also triggers during the inheritance in my PropertyMaint. Thank you for all the help, until next time.

Linnaire
  • 61
  • 9