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 :
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
    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

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 > Customer experience | Sales, Customer Insights, CRM

#1
Tom_Gioielli Profile Picture

Tom_Gioielli 108 Super User 2025 Season 2

#2
Jimmy Passeti Profile Picture

Jimmy Passeti 50 Most Valuable Professional

#3
Gerardo Rentería García Profile Picture

Gerardo Rentería Ga... 49 Most Valuable Professional

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans