The CreatorCon Call for Content is officially open! Get started here.

Is it possible to change a Field Type from Decimal to Integer?

richelle_pivec
Mega Guru

Is it possible to change a Field Type from Decimal to Integer? It does not appear to be a choice when I click on the magnifying glass next to the Type for an existing "decimal" field.

thanks,

Richelle

1 ACCEPTED SOLUTION

Chandu Telu
Tera Guru

Hi Richelle,

 

No, you can;t change the Field Type from Decimal to Integer it will through an error

View solution in original post

10 REPLIES 10

Thanks for sharing. I'm a bit confused because the BR is running on demand task which means it's going to trigger when task records are updated (which is typically correct) and your query looks right, but you are updating "current" which is the task record that's updated. Ouch, you just wiped out it's individual contribution number and replaced it with the sum of all individual tasks, making your new total wrong, and not on the parent record.

First, make sure this is an AFTER/UPDATE BR. Rule #1 - don't use "current.update()" in a BR. If you are, then you need to rethink your strategy. You don't need them. This is documented in our technical best practices on the developer site.

Inside the "if", you need something more like this... I'm going to use u_demand as the parent table as I don't know the real parent table name.

if (additional.next()) {
   var dmn = new GlideRecord('u_demand');
   if (dmn.get(current.parent)) {
     dmn.u_count = additional.getAggregate('SUM');
     dmn.update();
   }
}