Skip to main content
Solved

Create Stock Item with multi-level Item Class

  • Oct 27, 2023 1:14 AM UTC
  • 9 replies
  • 464 views
  • Translate All

jamest
Varsity I
Forum|alt.badge.img

Hi all, 

We’re still in implementation and I’m testing out the creation of Stock Items through the APIs. Back when we had two segment Item Classes, I had no trouble creating Stock Items. 

However, now that we’re testing out 5 level Item Classes, I’m having trouble finding the right ItemClass to send through the API. I keep getting “...cannot be found” on the Item Class object.

For example, here is a class from the Acumatica view:  ONS.PIPE____.__REG___.________.___

I’ve tried passing multiple combinations of that class. 

What is odd is when I query the stock item with that class, this is the output: 

I’ve tried using that string as an input also. 

Any help is greatly appreciated. 

Best answer by jamest

@jamest,

With the SalesDemo data, I am able to set the multi-level item class, tested in 23.111.

 

Thinking, if it has to do with Acumatica version, can you please confirm the version you are using? Also, did you get a chance to test with a different multi-level value?  

Ok, you pointed me in the right direction and got me thinking. 

Here’s what I tested:

  1. Does not work: ONS.PIPE____.__ASSY__.________.___
  2. Does not work: ONS.PIPE____.__HEAT__.________.___
  3. Works: ONS.FITTING_.ELBOW___.45DEG___.___
  4. Works: ONS.FITTING_.________.________.___

Here’s my theory. If the segment is left justified to the separator it works. If there are spaces between the separator and object string it fails. 

View original

9 replies

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

Hi @jamest,

You can create the stock item with the class from UI or use an existing stock item with the class, do a GET request to identify the right format/value that you can use the in the PUT request. Good Luck.!

Translate

jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • Oct 27, 2023 1:29 PM UTC

Hi @jamest,

You can create the stock item with the class from UI or use an existing stock item with the class, do a GET request to identify the right format/value that you can use the in the PUT request. Good Luck.!

That’s what I tried to do. The screen shot is a GET of an existing stock item. I tried to reuse the Item Class value and it cannot find it. 

 

Translate

StevenRatner
Varsity I
Forum|alt.badge.img

@jamest Try your value without any spaces for the “.” section divides.

Translate

jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • Oct 27, 2023 3:56 PM UTC

@jamestTry your value without any spaces for the “.” section divides.

I tried this one: 

"ItemClass": {

        "value": "ONS.PIPE.REG..",

        "error": "Item Class 'ONS.PIPE.REG..                ' cannot be found in the system."

 

This is what it looks like in the form: ONS.PIPE____.__REG___.________.___

 

Translate

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

@jamest,

With the SalesDemo data, I am able to set the multi-level item class, tested in 23.111.

 

Thinking, if it has to do with Acumatica version, can you please confirm the version you are using? Also, did you get a chance to test with a different multi-level value?  

Translate

jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • Answer
  • Oct 27, 2023 5:36 PM UTC

@jamest,

With the SalesDemo data, I am able to set the multi-level item class, tested in 23.111.

 

Thinking, if it has to do with Acumatica version, can you please confirm the version you are using? Also, did you get a chance to test with a different multi-level value?  

Ok, you pointed me in the right direction and got me thinking. 

Here’s what I tested:

  1. Does not work: ONS.PIPE____.__ASSY__.________.___
  2. Does not work: ONS.PIPE____.__HEAT__.________.___
  3. Works: ONS.FITTING_.ELBOW___.45DEG___.___
  4. Works: ONS.FITTING_.________.________.___

Here’s my theory. If the segment is left justified to the separator it works. If there are spaces between the separator and object string it fails. 

Translate

Vignesh Ponnusamy
Acumatica Moderator
Forum|alt.badge.img+5

@jamest, Interesting observation, I will try to test further. Thanks for sharing.!

Translate

Chris Hackett
Community Manager
Forum|alt.badge.img
  • Acumatica Community Manager
  • Dec 11, 2023 10:45 PM UTC

Hi @jamest were you able to find a solution? Thank you!

Translate

jamest
Varsity I
Forum|alt.badge.img
  • Author
  • Varsity I
  • Dec 12, 2023 1:56 AM UTC

Hi @jamest were you able to find a solution? Thank you!

Hi Chris, 

Yes, it was what I posted above. You can’t have the text in the middle of the segment. Once I left justified to the separator, it worked just fine. 

Translate