cancel
Showing results for 
Search instead for 
Did you mean: 

Bom error:price list does not exist;specify another pricelist

Former Member
0 Kudos

Dear experts ,

I am running an addon(vb) that creates bom.The problem is that when in the lines of bom the products have different pricelist i faced the error " price list does not exist;specify another pricelist [ITT1.PriceList] "

The code for this field :

       If rsMaterial.Fields.Item("IssueMethod").Value.ToString = "M" Then

                        vProdTree.Items.IssueMethod = "1"

                    Else

                        vProdTree.Items.IssueMethod = "0"

                    End If

When i am running the code the values are correct and when the code add the bom i have this error.

Note that the value 'M' comes from a table in sql.

Best Regards

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Could you please confirm which SAP Business One Version are you using?

Also please post a sample code that you are using.

Kind regards,

ANKIT CHAUHAN

SAP Business One Global Support

Former Member
0 Kudos

Hi ,

The Sap Business One Version : 9.0 pl 15

The code :

rsMaterialHead.DoQuery("SELECT * FROM [dbo].[table] ")

rsMaterialHead.MoveFirst()

While rsMaterialHead.EoF = False

   vProdTree.TreeCode = rsMaterialHead.Fields.Item("Code").Value.ToString

                vProdTree.Quantity = rsMaterialHead.Fields.Item("Qauntity").Value.ToString

                vProdTree.TreeType = "3"   

                vProdTree.PriceList = "6"

                vProdTree.Warehouse = "02"

   rsMaterial.DoQuery("SELECT * FROM [dbo].[table2]")

   rsMaterial.MoveFirst()

   While rsMaterial.EoF = False

  vProdTree.Items.ItemCode = rsMaterial.Fields.Item("Code").Value.ToString

                    vProdTree.Items.Quantity = ChangeToDouble(rsMaterial.Fields.Item("Quantity").Value.ToString)

                    vProdTree.Items.PriceList = "6"

                    vProdTree.Items.Comment = rsMaterial.Fields.Item("Comment").Value.ToString

              If rsMaterial.Fields.Item("IssueMethod").Value.ToString = "M" Then

                        vProdTree.Items.IssueMethod = "1"

                        Else

                        vProdTree.Items.IssueMethod = "0"

                      End If

  vProdTree.Items.Add()

                    rsMaterial.MoveNext()

  End While

  Try

                    lretcode1 = vProdTree.Add

       If lretcode1 <> 0 Then

                        oCompany.GetLastError(lErrCode1, sErrMsg1)

                        MsgBox(lErrCode1 & vbCrLf & sErrMsg1)

           End

       End If

               Catch ex As Exception

               MsgBox(ex)

               End Try

               rsMaterialHead.MoveNext()

End While

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi,

Could you please test the same scenario on SAP Business One Version 9.1 PL10 or higher and let us know the results?

There were some issues with the BOM while importing or updating. That has been fixed already.

Therefore, please test the scenario on SAP Business One Version 9.1 PL10 or higher.

Hope it helps.

Kind regards,

ANKIT CHAUHAN

SAP Business One Global Support

Answers (0)