I want to change custom field length through PHP Script. How to write a PHP Script for that and Where I have to keep that Script in Sugar 8.0 localhost?
I want to change custom field length through PHP Script. How to write a PHP Script for that and Where I have to keep that Script in Sugar 8.0 localhost?
Good morning Nagamani D,
I think you would probably have to define your own Endpoint ( https://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_9.0/Integration/Web_Services/REST_API/Extending_Endpoints/#Defining_New_Endpoints ) , and change the size in at least three places:
- the fields_meta_data table
- the _cstm table where your field actually is
- the vardefs for that module
You will need to refresh your cache after the changes are made. You could maybe get away with just the database changes if you can then execute a QRR to update the vardefs and cache. But I may very well have forgotten some steps, so take this with a grain of salt.
It really should be a one time thing to set the field length, and not something you need to do, or should do repeatedly, so I am curious, may I ask what your business case is for wanting to change field length through PHP instead of Studio?
FrancescaS
We want to upgrade our project from Sugar 8.0.3 to 9.0. While doing upgradation, we are facing problems with the field length.
Thank you Francesca Shiekh,
Can you please provide an exact solution?
Thank you Francesca Shiekh,
Can you please provide an exact solution?