You need to sign in to do that
Don't have an account?

Dynamically populating values
In the Account Object i have custom picklist for District and a number field called Postal Code.
I want to dynamically populate the postal code when the user selects the district before the record is saved.
Please let me know how can i do it.
Thanks in advance.
I want to dynamically populate the postal code when the user selects the district before the record is saved.
Please let me know how can i do it.
Thanks in advance.
-
Usage of dependent picklists: basically in this case Postal Code should be a Picklist (not a number), depending on District value, you can find more information about dependent pickslists here: https://help.salesforce.com/HTViewHelpDoc?id=fields_defining_field_dependencies.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=fields_defining_field_dependencies.htm&language=en_US) The drawback of this approach is that either you change Field Type for Postal Code, or you create a new field to replace its functionality.
-
Usage of VF development: if you are already in a VF page (you didn't specify it, that's why I am not sure), you can use an actionSupport which will update the value of Postal Code in a method in the server, and afterwards, rerender the part of code where Postal Code is, exactly as it is shown in this topic: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm
Regards,Gonzalo.
All Answers
-
Usage of dependent picklists: basically in this case Postal Code should be a Picklist (not a number), depending on District value, you can find more information about dependent pickslists here: https://help.salesforce.com/HTViewHelpDoc?id=fields_defining_field_dependencies.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=fields_defining_field_dependencies.htm&language=en_US) The drawback of this approach is that either you change Field Type for Postal Code, or you create a new field to replace its functionality.
-
Usage of VF development: if you are already in a VF page (you didn't specify it, that's why I am not sure), you can use an actionSupport which will update the value of Postal Code in a method in the server, and afterwards, rerender the part of code where Postal Code is, exactly as it is shown in this topic: http://www.salesforce.com/us/developer/docs/pages/Content/pages_compref_actionSupport.htm
Regards,Gonzalo.
I am already in visualforce page. I'll try the second option.