web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Incorrect attribute value type System.Int32

(0) ShareShare
ReportReport
Posted on by


Dim AC As New ServiceReference1.AttributeCollection
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_name", fullname))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_address", Address))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_annualvacation", Vac_Not_Used))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_dateofbirth", BirthDate))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_gender1", gender))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_maritalstatus", Status))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_nationality", Nat))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_nssfno", CNSSNBR))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_phoneno", Phone1))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_religion", Reg))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_salery", MBasic_Sal_LC))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_startdate", StDate))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_branch", BR.Id))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_department", DE.Id))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_jobtitle", JT.Id))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_section", SE.Id))
AC.Add(New KeyValuePair(Of String, Object)("mbmhr_employeenbr", EmpNbr))

Try

S.Attributes = AC
Dim OC As New ServiceReference1.OrganizationServiceClient
AddEmployee = OC.Create(S)
OC.Update(S)


Catch ex As Exception

End Try

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: Incorrect attribute value type System.Int32


    Guido this actually helped me lol, thanks a lot

  • Guido Preite Profile Picture
    54,084 Moderator on at
    RE: Incorrect attribute value type System.Int32

    something not clear from my previous reply?

  • Community Member Profile Picture
    on at
    RE: Incorrect attribute value type System.Int32

    how i convert to integer??

  • Verified answer
    Guido Preite Profile Picture
    54,084 Moderator on at
    RE: Incorrect attribute value type System.Int32

    you are setting a field with the wrong type

    or you have a whole number field that you are not setting an int

    or your have another type field that you are assigning an int

    you need to debug in order to know which exact line fails and after check the field type of the field and the value you are assigning

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Andrés Arias – Community Spotlight

We are honored to recognize Andrés Arias as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
Aric Levin - MVP Profile Picture

Aric Levin - MVP 2 Moderator

#2
MA-04060624-0 Profile Picture

MA-04060624-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans