SugarFieldAddress Modification

Hello guys,
SuiteCRM v7.12.4 here.
I wanna modify the Sugar Field for the addresses so instead of state and country to populate two custom fields with data from two fields from the Accounts Module (office_phone and a custome one which is named AFM_c).
I tried to do that with Add district into address - #5 by cloudcon as an example, but the field doesn’t grab any data and stays blank.
(I tried twice, the first with my custom fields in the modifications and the second with the billing district which is mentioned in the post, none worked for me).

Thanks in advance for your help,

Can you confirm that your changes are getting picked up by the Quick Repair and Rebuild? Are they found under custom/Ext/?

Is there anything relevant in one of the two logs when the screen shows blank?

Exactly what do you have in your include/SugarFields/Fields/Address/EditView.tpl now?

Yes i did repair and rebuild and i added all the modifications exactly as mentioned in the other post.

I changed all my files to the default versions cause i was afraid for any misfunction in the system. Right now my EditView.tpl is pretty much the basic one.

I am afraid i didnt check in the log files, have to rebuild the whole thing to check it out. In general that approach seems to work for modifying the address sugarfield? If so i will re try it when i find some spare time.

But, maybe, an other approach that would work in my case is to just delete the state/country fields (i tried that and worked, no biggie) and then make two custom fields via studio in the Quotes module which will grab data from office_phone and AFM_c fields in my Accounts module. Is it viable option to SuiteCRM? If so what would be the procedure? I tried that with a WorkFlow in Accounts module, which would run always and on all records, with condition Module = Accounts / Field = AFM_c / Operator = Equal To / Type = Any Change, and action Modify Record custom_field_name => field => AFM_c.


If you can avoid messing with the aggregated field (Address, which is made up from other fields) and stick to independent fields, everything will be easier to achieve from Studio.

The Workflow approach might work but don’t make that a “Always/All records” Workflow, except perhaps for a single run to work on past data. After that you can make it just “Only on save”

Tried with the workflow i mentioned earlier (also with the only on save option) but neither modified the field.
In the ACTIONS options the field you choose first (in the leftmost) is the field that will get modified and then you choose what value / field it will take, is it right?

Yes that is correct.

Perhaps you can try a few simple workflows just as exercises before you start trying to solve your issue - just to get the hang of it.

About the workflow types I have a post that might help:

Yeah that’s what i am gonna do, i just did a quick test cause i was lacking time. Will try that in the weekend.
Thanks a lot for the help, also for the link!

1 Like