You need to sign in to do that
Don't have an account?
B&D Developer
I need help with Apex Code
I need to capture the Contact Address and reder it in order address field if certain picklist value is selected.
I have two Contacts Record Types. Clinician and Customer.
If user selected Clinician from the picklist value, it should capture the clinician address and render it in tyhe new order shipping address.
Likewise iwf customer is selected.
Thanks in advance
Since you also have a manual input, we can go for Workflow rules.
Recipient_Clinician__r.Ship_To1__c,
IF(ISPICKVAL(Ship_To__c, 'Customer'),
Order_Contact__r.Ship_To1__c,
null),
null)
I haven't tested this. Please let me know if you are getting any error.
As I said earlier, please note that this wont auto populate. This will populate the address field on Saving.
--
Abhi
If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted.
All Answers
If you are not using, then write a validation rule to make the specific address field mandatory based on picklist field.
Let me know if you need further clarity. It would be great to know what you have done to achieve this.
--
Abhi
I'm not using any VF Page
Do you need help in writing valdiation rules? If yes, please let me know the names(API names) of the fields you are using.
--
Abhi
It should be like this,
Once you create and New Order for Customer there will be a picklist field for youto choose whether to ship the device to Clinic, Customer, or Custom Address,
If you selected Clinic in Ship To (Ship_To__c), it should autopopulate the address of Clinic (Recipient_Clinician__r.Ship_To1__c), If customer is selected, it shoudl populate Customer's Address (Order_Contact__r.Ship_To1__c), and if Custom, the user can enter address Manually.
Thanks for the help
Since you also have a manual input, we can go for Workflow rules.
Recipient_Clinician__r.Ship_To1__c,
IF(ISPICKVAL(Ship_To__c, 'Customer'),
Order_Contact__r.Ship_To1__c,
null),
null)
I haven't tested this. Please let me know if you are getting any error.
As I said earlier, please note that this wont auto populate. This will populate the address field on Saving.
--
Abhi
If my answer helps to solve the issue/problem/doubt, please mark it as Best Answer; so that people who are stuck in the similar issue get benefitted.
What is needed is for the address to appear once picklist value is selected.
Is this possible/
Thanks Abhi
Thanks