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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Customer Aging report SQL error after CU7 update to AX2012 R2

(0) ShareShare
ReportReport
Posted on by 260

After I applied a CU7 update to our AX2012 R2 installation, One of the users reported this error to me.

Cannot edit a record in Customer or vendor account number (CustVendTransAging).

The SQL database has issued an error.

SQL error description: [Microsoft][SQL Server Native Client 10.0][SQL Server]String or binary data would be truncated.

SQL statement: UPDATE T1 SET NAME=T3.NAME,RECVERSION=? FROM tempdb."DBO".t12143_065EB03A5044473883A01845DF64A84A T1 CROSS JOIN CUSTTABLE T2 CROSS JOIN DIRPARTYTABLE T3 WHERE (T1.PARTITION=?) AND (((T2.PARTITION=?) AND (T2.DATAAREAID=?)) AND (T1.ACCOUNTNUM=T2.ACCOUNTNUM)) AND ((T3.PARTITION=?) AND (T2.PARTY=T3.RECID))

 

It turns out that the Name field on the table CustVentTransAging has an extended data type of Name which is 60 characters  however it was being assigned a value from DirPartTable.Name which has an extended Data Type fo DirPartyName which is 100 characters. 

 

So I changed the extended data type on CustVentTransAging  from Name to DirPartyName and the RESOLVED the issue.

 

If you do not like that solution, you can go to \Classes\CustVendAgingCalculation and inspect the method insertCustVendData maybe you can re write the update code there to meet your needs.

Thanks,

Keep sharing the knowledge.

-Albert.

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    dillonb Profile Picture
    315 on at

    Hi Albert,

    I introduced your fix above but was immediately faced with another SQL error.  If anyone else faces a similar issue, there are a series of [Txt] fields and [Name] fields on Tmp tables throughout this classes operation that are too short given their counterparts in non temp tables.  Below are the tables and fields I changed the extended data types of to get the report running properly.

    This error was also causing the Customer Ageing Snapshot to fail (AR > Periodi > Collections > Customer ageing snapshot)

    Table Field Updated ExtendedDataType
    CustVendTransAging Name DirPartyName
    CustVendAgingCalculatedTmp Txt ItemFreeTxt
    CustTmpAccountSum Txt ItemFreeTxt
    CustTmpAccountSum Name DirPartyName
    CustAgingReportTmp Txt ItemFreeTxt
  • Renaud PAQUAY Profile Picture
    on at

    Hello,

    Thank you that post saved me a lot of debugging time.

    Notice the problem is referenced as KB 2919749

  • Continued in groupheader and page number reset in SSRS Profile Picture
    5 on at

    Hello,

    Thank you for  the post, saved me a lot of debugging time.

  • dillonb Profile Picture
    315 on at

    No worries Renaud, thanks for the KB article # as well!

  • Shevchuk Pavel Profile Picture
    165 on at

    Hi Dillon, thank you very much, Albert's way was not enough for my case

  • dillonb Profile Picture
    315 on at

    No worries Pavel, happy to help!

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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans