calculated fieds. how to??'

hello. I need to make some formulas in my project like create 3 fields where: sale amount (field 1) - production cost ( field 2) = profit ( field 3)

example 10000-70000= 30000

can anyone help me please??

thank you anyway

you need to take a look at logic hooks http://support.sugarcrm.com/Documentation/Sugar_Developer/Sugar_Developer_Guide_6.5/Module_Framework/Logic_Hooks/ or if you want to achieve things on the fly you need to add custom jasvascript files

best regards

can you help with this???obviously paid work.Please??

I think you are looking for something like attached.

This is a custom field which works just like Sugar PRO calculate field. This is not on Hooks, it works on the fly.

2 Likes

Hi,

How do you enable the “calculated field”, as I cant see it in the “Data Type” options? Wonder if you can assist with this?

This does not come as default Option. To achieve the functionality you need to develop a custom field as shown in the previous post. This is a calculated field package which i have built. Let me know if you are in need of this.

that would really help. how can we do that and which numbers do you have in mind to share that module?

that would really help. how can we do that and which numbers do you have in mind to share that module?

Hello, can we have the code for the calculated fields?
thank you!

1 Like

For example u can do this with JavaScript in customCode option.


'customCode' => '{$fields.theFieldName.value}  + {$fields.theFieldName2.value} 

https://suitecrm.com/community/forum/developer-help/5050-field-to-add-custom-format-in-edit-view-what-is-the-syntax-for-doing-the-same-in-detail-view

many thanks for the information; I’ll give it a try.

Dear cherub-chum,

Can you please share how to do it in step-by-step instructions or images?

With thanks,

RK