Skip to main content
I'm running into an issue when I'm attempting to create a record that tracks changes in the NumberOfEmployees field on the account. I get the following error (screenshot) when I input a number on the account and save. I think the error is saying that it is not the right value 23.0 when I believe it should just be inserted as 23 but can't figure out how to convert it to successfully save the record. 

 

The expectation is that it takes that number via process builder and creates a related record that stores that number on a number field in the new record. I've tested converting the receiving number field to have decimal which doesn't seem to work. Oddly if I'm only copying the number from one account field to another it works fine and only seems to be an issue when creating this related record. 

 

For Input String error when copying Employee field value from Account to new record.
4 respuestas
  1. 7 may 2020, 05:03

    Hey - 

    I am thinking about the original problem, which I understand to be: "... to create a record that tracks changes in the NumberOfEmployees field on the account." If that's the case, you may want to consider field history tracking (https://help.salesforce.com/articleView?id=tracking_field_history.htm&type=5) or reporting snapshot (https://help.salesforce.com/apex/HTViewHelpDoc?id=data_about_analytic_snap.htm) instead of creating a custom object/new record. 

    However, if you're set on the current approach, I was able to create a new record when an integer on a new or edited account was inputted or changed. The action references the account's number field to create a new record, and set its integer field to the account's integer field which triggered the process. Keep in mind that I am using two random objects (Account and Contract) for the demo, but both fields are numbers (integers).

    Here's how the process looks like: 

    1. Start when a record is created or edited

     Hey - I am thinking about the original problem, which I understand to be:

     

    2. When the "number field" on the account is not null. You can add criteria as needed in your case. I also ticked the checkbox under Advance so that the action executes only when this specific event occurs.

     

    User-added image

     

    3. Use the field reference type to set the new record's number field. 

     

    User-added image

     

    Let me know if that's the problem that you're trying to solve and whether this is what you had in mind! 

    -Bartek

0/9000