API Field Name Validation

0 Likes

API Field Name Validation

My organization ran into an issue when creating new data fields. You cannot use capital letters in the API name, which we were not aware of. The tool also does not do any verification or show any error message if API fields are named incorrectly. This resulted in us having to go back into the tool, hide the fields with the incorrect set of API names, and then create a new set of fields with proper names.

It would be very helpful to have some type of verification that field names have the right naming syntax while they are being created to prevent mistakes like this.

12 Comments
Grant_Booth
Level 10

Hi Neil,


Could you explain what kind of field name validation for the custom object editor you had in mind? For example, how would it determine that an API name has bad syntax or is "invalid"?


Thanks!
Grant

Anonymous
Not applicable

Hi Grant,

When you create a new field in the field management tool in Admin, the API name is automatically derived from the field name you enter. If I use capital letters in the field name, the API also has capital letters, which are invalid in API names. What I am asking for is either for the automatic API name creator to always use lowercase letters as it is creating the name, or for there to be an error message when you hit the create button so that you can go back and correct the API name. This would save a lot of frustration and wasted time because it is not obvious that capital letters or potentially other characters are indeed invalid.

Thanks,

Neil

Grant_Booth
Level 10

Hi Neil,


What is indicating to you that capital letters are invalid? The new custom object editor does validate against capital letters, and autopopulates the API name with lower case letters:

CustomObjectField.png

Regular fields, such as those created in Admin > Field Management, do not validate against capital letters, and an API name created using capital letters should be valid:

RegularCustomField.png

Are you receiving errors when trying to do API calls to a regular field which has upper case letters in the API name? If so, could you insert some screenshots to explain?

-Grant

Anonymous
Not applicable

The issue took place quite awhile ago and it had to do with the standard

field management tool. I remember being told that API names had to be all

lowercase (hence my making this suggestion. I know there was an issue where

I was told that API names had to be all lowercase. That may be old

information or incorrect information, but that was what I was told.

On Fri, Aug 7, 2015 at 1:45 PM, Grant Booth <marketingnation@marketo.com>

Grant_Booth
Level 10

I see - do you have a support case number so I can confirm? If there is bad information till being propagated, I'd like to correct it. Or, if this was a misunderstanding, I'll be happy to clarify it.

Anonymous
Not applicable

Not a lot of detail, but case number is 00397125

An API name of such a field that was made inactive

was SVZ_Invoice_Last_90_Days_Total_Paid_Invoices

Thanks,

Neil

On Mon, Aug 10, 2015 at 9:24 AM, Grant Booth <marketingnation@marketo.com>

Grant_Booth
Level 10

Hi Neil,


I don't see anything in that case which says API names must be all-lowercase, just that you had created fields with "invalid API names", and Support helped you rename the fields and then create new ones with correct API names. Are you certain the problem wasn't that the 3rd party service you needed the fields for required lower-case API names? Since that would be unique to that 3rd party service, Marketo would not validate against it, since Marketo would have no way of knowing what a certain service deemed as "valid" v. "invalid".

Grant

Anonymous
Not applicable

We populate the data straight from our SQL database. I don't think that was

the issue. Again, this is going back to March, so I don't remember all of

the details, but I don't think it had to do with limitations in our system.

On Mon, Aug 10, 2015 at 10:02 AM, Grant Booth <marketingnation@marketo.com>

Grant_Booth
Level 10

What kind of server does your SQL database run on? Could impact whether or not table and column names (file names on the server) are case sensitive.

Anonymous
Not applicable

We are on MySQL and are migrating to AWS Aurora.

On Mon, Aug 10, 2015 at 10:21 AM, Grant Booth <marketingnation@marketo.com>