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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

How to get the value from int64 field asset type to str

(0) ShareShare
ReportReport
Posted on by 204
Hi,
I have a requirement to display the asset type value in my custom form based on asset id where asset type is of int64 type. 
I have tried using display method and also used find method and tried to insert, I've even used int642str. But the asset type value is being displayed as some numeric value like : /5637146132/. I've checked in SQL also, it shows 5637146132 for asset type field. But in front end it shows as string. 

How can I get the string value displayed for the asset type field?
  • Martin Dráb Profile Picture
    241,467 Most Valuable Professional on at
    Please give us more details. What value from which table are you trying to get?
     
    Also, where does you custom form gets the value? From a table field? If so, which one?
  • Suggested answer
    Deepak Agarwal Profile Picture
    9,368 Super User 2026 Season 2 on at
    It seems AssetType in your table is rec if of the original table, first you need to find the relation to the actual table where you may find some string value of AssetType. 
    As you may have noted it's Int64 which is supposed to be a numeric value and that wast you are getting when converting it to a string. 
     
    So all you need to do is go to your table relation find the parent table of AssetType and write logic to feth value, for eg, 
     
    select assetTypeTable
    where assetTypeTable.assetType == AssetType;
     
    return assetTypeTable.Description or name
  • Deepak Agarwal Profile Picture
    9,368 Super User 2026 Season 2 on at
    btw, assetType is std ENUM in system,
  • RSX Profile Picture
    204 on at
    Hi Deepak,

    I've checked the relation and  relation was with rec id and used the same to find using rec id and inserted the actual table's (objecttype) string value and it worked fine now. Thanks.
  • André Arnaud de Calavon Profile Picture
    307,808 Super User 2026 Season 2 on at
    Hi RSX,
     
    Can you tell if the reply from Deepak where he shared a coding tip helped you? If so, would you mind to verify his answer so this post will get the status answered? 

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
Martin Dráb Profile Picture

Martin Dráb 544 Most Valuable Professional

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 347 Super User 2026 Season 2

#3
CU-1234529-002 Profile Picture

CU-1234529-002 197

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans