When we hit Best practice warning like this /The type conversion from 'int64' to 'int' loses range./ What is the best way to handle it ?
For my current issue, this is because I put a RecId field into an INT variable, after I'm select query with count, because I just want to have the total rows (records). Should I just change my variable to Int64 as well ? this
How to handle The type conversion from 'int64' to 'int' loses range warning ?
Changing the type of the variable to int64 is a possible approach.
If you're sure that the number will never be higher than what int type can hold, you can use int642int() method to do the cast explicitly.
Was this reply helpful?YesNo
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.