• Wagner Coelho
  • 0 Points
  • Member since 2021

  • Chatter
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
  • 3
I am getting this error while submitting approval process.
Unable to Process Approval Request
This approval request requires the next approver to be determined by the Manager field. This value is empty. Please contact your administrator for more information. 

 I tried with mod(integer,integer) and  integer %10 but errors are thrown

what can i do to get remainder when division operation is performed

  • December 21, 2010
  • Like
  • 0
I see the the Apex Math.round() function is being deprecated in favor of Math.roundToLong().

It looks like we now have to use the following code to convert a number field value from double to integer for use in functions that require integer parms (e.g. Date.newInstance(year,month,day))

Integer intValue = Integer.valueOf(String.valueOf(Math.roundToLong(object.Some_Number_Field__c)));

Are there plans to allow casting or conversion from Long to Integer in Apex?  Or at least, is there an easier way to achieve the same result than the example above?