Skip to Content
avatar image
Former Member

Error : Conversion failed when converting the nvarchar value to data type int on UDO.

Hi everybody.

I'm currently doing an UDO to calculate comission for every seller on SAP Business One 8.82

Whenever I add info and save it, I got the following error:

"Conversion failed when converting the nvarchar value 'NAME_OF_THE_UDO' to data type int"

Don't know what to do...

Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

5 Answers

  • Jan 10, 2015 at 06:45 AM

    Hi,

    Please advice type of UDO and post formula for commission here to check.

    Thanks & Regards,

    Nagarajan

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10, 2015 at 07:09 AM

    Hi,

         What is the data type of your UDO field and what type of data your are saving on that field???

    Regards,

    Manish

    Add comment
    10|10000 characters needed characters exceeded

  • Jan 10, 2015 at 07:25 AM

    Hi,

    If your field is in INT then you can use the Cast or Convert to convert the type of your filed.

    Use the below syntax.

    cast(A.my_NvarcharColumn as INT)

    or

    convert (int, N'A.my_NvarcharColumn')

    this will be helpful.

    Regards,

    Ravi.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 13, 2015 at 06:50 PM

    Hi Manuel,

    You need to apply a CAST or a CONVERT to the value on the field, please follow the next link:

    http://msdn.microsoft.com/es-MX/library/ms187928.aspx

    Regards,

    David Almazán

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Jan 14, 2015 at 11:55 PM

    Thank you all for your replies. I think I didn't express myself very well.

    What I'm trying to do is a window where the user can manually enter the commission percentage.

    So I created a User-Defined Table called 'Commissions'.

    Then I created another table called 'Commissions_Details' and added some UDO's.

    Now, whenever I try to save the data I receive the error: Conversion failed when converting the nvarchar value 'Commissions' to data type int.

    I have no idea where and what I have to cast. The funny thing is that it saves the information.

    Thanks

    Manuel

    Add comment
    10|10000 characters needed characters exceeded