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 :
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 202
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?
I have the same question (0)
  • Martin Dráb Profile Picture
    236,513 Most Valuable Professional on at
    How to get the value from int64 field asset type to str
    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
    8,585 on at
    How to get the value from int64 field asset type to str
    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
    8,585 on at
    How to get the value from int64 field asset type to str
    btw, assetType is std ENUM in system,
  • RSX Profile Picture
    202 on at
    How to get the value from int64 field asset type to str
    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
    299,415 Super User 2025 Season 2 on at
    How to get the value from int64 field asset type to str
    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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

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

#1
CA Neeraj Kumar Profile Picture

CA Neeraj Kumar 1,841

#2
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 783 Super User 2025 Season 2

#3
Sohaib Cheema Profile Picture

Sohaib Cheema 490 User Group Leader

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans