Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX forum
Suggested answer

convert datatype in insert_recordset method

Posted on by 560

 Hi all,

Using  insert_recordset method insert the record from one table to other name.

Fields are same but datatype is different .I use below code but show error in conversation.

Bu is int data type in jmTrialTestTBCopy,

BU is Str data type in jmTrialTestTB,

 

 

JMTrialTestTB jmTrialTestTB;

JMTrialTestTBCopy jmTrialTestTBCopy;

insert_recordset jmTrialTestTBCopy

(Main,

BU,

LE)

select Main,BU,LE from jmTrialTestTB;

  • TonyAx Profile Picture
    TonyAx 560 on at
    RE: convert datatype in insert_recordset method

    Thanks for replay Martin,

    Sure I will approach in view

  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 225,588 Super User on at
    RE: convert datatype in insert_recordset method

    It seems that you again has a bug in the data model.

    As discussed in your other thread, the best approach would be fixing your data model. If it's truly impossible for you, a possible workaround is creating a view with the computed column, where you'll do the conversion. Then you can query this view instead of JMTrialTestTB.

Helpful resources

Quick Links

Replay now available! Dynamics 365 Community Call (CRM Edition)

Catch up on the first D365 Community Call held on 7/10

Community Spotlight of the Month

Kudos to Saurav Dhyani!

Congratulations to the June Top 10 community leaders!

These stars go above and beyond . . .

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 287,989 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 225,588 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans