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 :
Customer experience | Sales, Customer Insights,...
Suggested Answer

Is it possible get the integer value of 'single line text' in a calculated field

(0) ShareShare
ReportReport
Posted on by 8

It shows an error.

You can't set the value new_refobj.fieldname., which is of type string, to type integer

I have the same question (0)
  • Suggested answer
    Miguel Lourenco Profile Picture
    Microsoft Employee on at

    Hi,

    What is your code?

    From your description it seems you're trying to set the value rather than getting.

    Have you tried:

    Xrm.Page.getAttribute("new_refobj").getValue();

    Regards,

  • phanikumar Profile Picture
    8 on at

    Hi,

    It is not in the web resource, I am creating a calculated  field. I require a formula to get value populated form a string field and store as integer field in the calculated field(whole number type).

    2742.Calculated-Field.png

  • Suggested answer
    Marco.P Profile Picture
    2,405 on at

    Hi,

    unfortunatly that can be done with calculated fields. You can refer to this to take a look at the formula availables:

    www.encloud9.com/.../

    You can try to achieve your goal by using a js function, take a look at this :

    carldesouza.com/.../

    Hope it helps!

    Please, mark the answer as verified if you find it useful or to close this thread.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
ManoVerse Profile Picture

ManoVerse 202 Super User 2026 Season 1

#2
CU11031447-0 Profile Picture

CU11031447-0 100

#3
NeerajPawar Profile Picture

NeerajPawar 70

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans