Hi,
- Create VF page wizard
- Create an object “Company”, having below fields,
- Company Name
- Address 1
- Zip Code
- State
- Country
- Company Owner Name
- Create object “Employee” with below fields,
- Employee Name --text
- Employee Designation --text
- Company – Master Details to Company
- Phone Number
- Email.
- Create a VF tab which will redirect user to a VF page populating Company fields as Input fields with blank values.
- Create two buttons on this page,
- Save---On click of this button create a new record in Company object with the values inputted by user and redirect user to company detail page. Add error messages on page if user clicks on this button leaving any field blank.
- Create Employee – On Click of this button perform all operations stated above, but instead of redirecting user to company detail page redirect to another VF page where user can create employees associated with the company created.
- On the second VF page populate all the Employee fields as I/P fields except Company field which should be auto populated with company created on first page.
- Here there should be two buttons on this VF page
- Save – create employee record with the values entered and redirect to company detail page.
- Save and New – Create employee record with values entered and redirect to same VF page so that user can create another employee.
I'm new to VF page and not getting howto create button to redirect page from company to employee page. Please help me in creating button.
2 件の回答
Hi Pallavi,
You may refer below link for opening aother VF page on button click:
https://salesforce.stackexchange.com/questions/117217/how-to-call-another-visualforce-page-from-an-apex-command-button/117223