+ Start a Discussion
Leen Van PeltLeen Van Pelt 

help to get started programming the value of a field based on another field

Hi guys,
I need a push in the right direction. 
I have a table with a field that contains a code. I'll call this the "code field".
I need to automatically fill another field: I need to calculate a "password" based on that code. So I'll call this the "password field". Every time the "code field" changes, the "password field" needs to change. 
The method to calculate the password requires complex code. In its current form, it's more than 10 pages, with a lot of for-next-things and so on.
So the simple formulae editor will not suffice. I need a Java or C#-like language.
I've looked to Apex and VisualForce the past few days, but I can't get my head around it, I still don't know how to start.
Can someone push me in the right direction?
Another important question: I'm testing this out with a free developer Account. In the development console, I can create new Apex classes and so on.
But in the account I use from my business, I can't create a new Apex class. It's a Group Edition account (we have a few Group Edition accounts). Why is this? 
Thanks a lot in advance,
Leen
Best Answer chosen by Leen Van Pelt
Ramu_SFDCRamu_SFDC
1. To have one field changed based on other field value, you need to use actionfunction which provides ajax support for visualforce pages. Here is an article that has more information on this https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm
2. Group edition does not support apex. however, you can use any appexchange apps that support these editions. For more information please refer to this article http://www.salesforce.com/us/developer/docs/packagingGuide/Content/dev_packages_apex_ge_pe.htm

All Answers

Ramu_SFDCRamu_SFDC
1. To have one field changed based on other field value, you need to use actionfunction which provides ajax support for visualforce pages. Here is an article that has more information on this https://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionFunction.htm
2. Group edition does not support apex. however, you can use any appexchange apps that support these editions. For more information please refer to this article http://www.salesforce.com/us/developer/docs/packagingGuide/Content/dev_packages_apex_ge_pe.htm
This was selected as the best answer
Shashank SrivatsavayaShashank Srivatsavaya
You would need to know APEX coding to achieve this, since point-and-click features in salesforce may not be able to handle your long complex code.

One more alternative, if you are not ready for APEX, would be to use Workflow Rules in Salesforce to send a SOAP-based outbound message, containing the record ID and the value in your code field, to an external system written in your preferred language, calculate the password in your external system, and use the SOAP or REST API provided by Salesforce to make a web service update call on the record's password field.

Unfortunately, both these methods are not possible in the Group Edition. You would need an Enterprise Edition for this.
Leen Van PeltLeen Van Pelt
Alright, thanks for the information!