cancel
Showing results for 
Search instead for 
Did you mean: 

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

0 Kudos

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!

Accepted Solutions (0)

Answers (6)

Answers (6)

0 Kudos

Hi alejandrovasqz

You can check Stoted Procedure that your query is correct. That error I have seen before and I chaecked on Stored Procedure and fix it. After that can add UDO.

Thank you

0 Kudos

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

kothandaraman_nagarajan
Active Contributor
0 Kudos

Any FMS or TN for that UDT?

0 Kudos

I'm really sorry but I don't know what FMS or TN mean...

kothandaraman_nagarajan
Active Contributor
0 Kudos

Please share your UDT with commision field and error message here.

FMS- Formatted search query---> To pick value from one field to another field.

TN - Transaction Noitification-->To block add/update/delete/cancel of marking documents as well as UDT.

0 Kudos

Thanks. There is no FMS nor TN on the UDT.

I don't have any commission field neither, "commissions" is the name of the UDT.

Former Member
0 Kudos

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

Former Member
0 Kudos

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.

former_member184146
Active Contributor
0 Kudos

Hi,

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

Regards,

Manish

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

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

Thanks & Regards,

Nagarajan