Access new columns on DB made by code

Hello,
I have xml files with db info that i need to upload to suitecrm db.
I’ve build a program that runs xml to php array and then inserts or updates Accounts to suitecrm DB.

Since the xml has more fields i had to add columns to the DB i would like to suggest that in the Admin>Accounts>Layouts>ListView on the Available Column my new columns could appear. Or is there a way that i couldn’t find to make that happen?
I just feel so lost in your structure

Why i’m doing this method and not importing the data through csv because i can’t. that’s all i can say…

You will need to let SuiteCRM know about the new columns. Either create the new columns through studio (though they will be suffixed with “_c” or, alternatively, add new vardef definitions for the fields.

Please note that it’s always worth taking a backup before changing the database or SuiteCRM files.

Thanks,
Jim

I just need to know how to update that list where’s the code that reaches the db and displays all rows in that column in “Admin>Accounts>Layouts>ListView on the Available Column”

The code that does this isn’t in any one place. The ListView code uses the field definitions to determine how to display the lists. You can’t simply add the fields to the DB and have SuiteCRM pick them up. You will need to define them in SuiteCRM, again either through Studio or the vardefs.

Thanks,
Jim

Where’s the vardefs in accounts?

Custom vardefs can be added in

custom/Extension/modules/Accounts/Ext/Vardefs/

Field definitions in here are added to the vardefs. Please note that adding custom vardefs requires some knowledge of SuiteCRM.

Thanks,
Jim

Sry but i think we are not on the same page what you described was to create fields i don’t want that i just want to see my new db table columns i created with my code

You can’t just add columns to the tables and have them appear. SuiteCRM doesn’t use the database to determine what fields are available it only uses the database to store data for fields it knows about. You have to either create the fields in Studio, which I recommend or add them as vardefs.

SuiteCRM will only display the fields it is aware of as options in list views it wont load every field that is available in the database.

Then again that’s why i’m posting this in the suggestion topic it would be better if it did read all the columns from that table
Greetings