I am seeing some odd behaviour with Numeric vs Percent fields.
I have two fields, on separate objects:
- Percentage Commission on Object A - Number(15,3)
- Percentage Commission on Object B - Percent(3,4)
So, in Object A I am seeing values like 0.05 to represent 5% and then when these values are copied (via Apex) to Object B I am seeing the value 5.
This is all working as expected in both Packaging org and Sandbox, but as soon as deployed to Production I now get 0.5 in Object A and also 0.5 in Object B so instead of some a salesman getting 5% commission, they're only getting 0.05% (I know, poor them ;).
This is the line of Apex that performs the copy each 'line' is an instance of Object A, detail is an instance of Object B:
detail.Percent_Commission__c = (Decimal)line.get('Rep_Percentage__c');
Am I just missing something really obvious or is there something else at play? Thanks!