Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Unanswered

Error Unable to cast object in standard code

(1) ShareShare
ReportReport
Posted on by 125
Hello Team,
While entering information in Dimension TAB in all forms like (General Journal etc) in Tier1 environments getting error "Unable to cast object of type 'Dynamics.AX.Application.FormBuildIntControl' to type 'Dynamics.AX.Application.FormBuildStringControl'.". This error is coming from Standard Code from init() method of DimensionLookup Form code. There is no customization done.
Facing this issue only in Tier1 environments, Tier 2 & production working fine.
Attached screen shots for the error & error code.
 
Pl. advice !!!
 
 
 
 
Categories:
  • Martin Dráb Profile Picture
    232,160 Most Valuable Professional on at
    Error Unable to cast object in standard code
    It seems that dimAttrViewContract() returns an ID of an integer field, but a string field is expected. The value should indeed be a string.
     
    My next step would be finding which table and field it's about; it'll likely lead you to the cause. I suspect a wrongly implemented custom dimension (despite you saying that there are no customization).
  • Jonas "Jones" Melgaard Profile Picture
    3,122 Super User 2025 Season 1 on at
    Error Unable to cast object in standard code
    Hi TU1506,
     
    Start by checking if your Tier-1 environment is on the same version as the Tier-2 and production environment.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Kudos to the February Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 293,309 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,160 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Product updates

Dynamics 365 release plans