You need to sign in to do that
Don't have an account?
Ahlomon
If the field is greater than '999' then returns error. Please advise...
If the field (below in red) is greater than '999', for example '1,357' then returns error. The field defined as number (8,0) in the object.
If the field is less than 1,000 then it works.
Please help me to understand this problem.
==============================================================
var o = new sforce.SObject('IS_Machine_Make_Model__c');
o.set('Machine_Make__c', mach_make);
o.set('Machine_Model__c', mach_model);
o.set('Feet__c', blade_feet);
o.set('Inches__c', blade_inches);
o.set('Name', is_make_model);
o.set('Blade_Width_Common__c', blade_width);
o.set('Blade_Gauge__c', blade_gauge);
o.set('Orientation__c', orientation);
o.set('Feed_System__c', feed_system);
o.set('Blade_Length_mm__c', blade_length_mm);
o.set('Blade_Gauge_mm__c', blade_gauge_mm);
o.set('Blade_Width_mm__c', blade_width_mm);
o.set('Machine_Make__c', mach_make);
o.set('Machine_Model__c', mach_model);
o.set('Feet__c', blade_feet);
o.set('Inches__c', blade_inches);
o.set('Name', is_make_model);
o.set('Blade_Width_Common__c', blade_width);
o.set('Blade_Gauge__c', blade_gauge);
o.set('Orientation__c', orientation);
o.set('Feed_System__c', feed_system);
o.set('Blade_Length_mm__c', blade_length_mm);
o.set('Blade_Gauge_mm__c', blade_gauge_mm);
o.set('Blade_Width_mm__c', blade_width_mm);
var results = sforce.connection.create([o]);
var locationString = '/' + results[0].id + '/e';
locationString += '?retURL=%2F' + results[0].id;
var locationString = '/' + results[0].id + '/e';
locationString += '?retURL=%2F' + results[0].id;
I am not putting the commas, when it saved from edit mode to detail mode it puts the comas because the field defined as number(8,0)
Any idea how I can solve this problem?
There is NO validation rules, no I didn't run it in debug, but the value shows for example '1,357' and you are right as soon as it sees the comma it errors on this line ==> var results = sforce.connection.create([o]);
I am still not shure why what to do here
Why not? It could provide a crucial clue.
I did try debug...
Unfortunatelly, there is no way I can track S-Controls in Debug, so it was just empty after I did set it up