function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rich Englhard 7Rich Englhard 7 

Visual Workflow Error - Number Input Fields

Hi All,

I've created a visual workflow that asks the users for a number.  It maps to a number field on the quote object.  When I try to do a fast create for quote, I get the below error.

UPSERT --- UPSERT FAILED --- ERRORS : (INVALID_TYPE_ON_FIELD_IN_RECORD) Term: value not of required type: 36 --- for SFDC record with ID : null,

The field in the quote does have the decimal places as two.  When I type in 36.00, I still get the error.  The only time I do not get the error is when I type in 36.01 or some number that has 2 decimal places.  I even created a new field to test, put decimal places as 0, and I still got the error.  Does anyone know how to create an input type field of number and have it update a field type of number?  My assignment is correct to assign the object field to the number.  The odd part about this is I am using fast create, do not have a record ID as I'm trying to create a new quote, yet it is showing that I am upserting...  The field Term is the number field that I am trying to update.  I am currently building this in my sandbox to test.  Any help would be appreciated!
Best Answer chosen by Rich Englhard 7
JeffreyKranzJeffreyKranz
Ok, well, I've figured out a workaround.  You can create a Number formula that just takes the Field Input value as its expression.  You can then use this formula field to update/insert the number value in the record without the Invalid Type error.  Not sure why this error occurs, however.  Maybe I'll submit a bug report if I can't find it in Known Issues.

All Answers

JeffreyKranzJeffreyKranz

I am getting this exact same error.  I was browsing this board to see if someone else has come across this and if they came up with a workaround.  Looks like I'm not the only one, but no solution :(

I'll hammer away at this and post here if I find anything...

JeffreyKranzJeffreyKranz
Ok, well, I've figured out a workaround.  You can create a Number formula that just takes the Field Input value as its expression.  You can then use this formula field to update/insert the number value in the record without the Invalid Type error.  Not sure why this error occurs, however.  Maybe I'll submit a bug report if I can't find it in Known Issues.
This was selected as the best answer
BugBearBugBugBearBug
We have the exact same problem. Raised a bug with SF which they are currently investigating. Are there any other workarounds? This seemt to be a bug at a very fundamental level i.e. number type mapping.
JeffreyKranzJeffreyKranz

BugBearBug- Does my workaround work for you?  In the flow, create a Number formula whose expression is simply the Field Input.  You should then be able to use this formula as the source for updates/inserts into a Number field on a record without the error.  

Did your bug report result in a Known Issues listing?  If so, can you post a link so that others can report experiencing the same issue?

Big EarsBig Ears
jkrk - Thanks! I was having the same issue with some currency fields. I tried all sorts of things, but your workaround worked.
Rich Englhard 7Rich Englhard 7
Yes, thanks jkrk, I've been using this in MANY flows.  It is such a pain!  I hope SF fixes this bug soon!  Just selected it as the best answer, sorry I forgot to do that earlier!
Mark RootMark Root
I did not find any mention of this bug on success.salesforce.com and so I just posted instructions on how to replicate the problem (https://success.salesforce.com/answers?id=90630000000ssQDAAY).  My workaround has been to use Record Update instead but I'd much rather be using Fast Update for this, if only it worked.