Create New Record by Default on Navigation
The requirement is when user clicks on a custom button in Account Detail – Opportunities View under the Accounts Screen, button click should re-direct the user to Contacts view and user should see a default new record created in the Contact List Applet.
User does have to explicitly create the record when navigated to Contacts view using this button.
Follow the below steps to implement this requirement.
1. Go to the Source applet under Account Detail – Opportunities View which is “Related Opportunities List Applet” and create a custom button with HTML type as “Minibutton” as shown below:
Expose this button in the list applet using Edit Web layout.
2. In the same applet, do Edit Server Scripts and write the below lines of code to enable this button on the UI
Again in the Server Scripts, write the below lines of code to navigate to the view using GotoView method.
3. Now go to the destination applet i.e. Contact List Applet and write below lines of code in Browser Script as shown below:
4. Compile both the applets and generate the genb scripts. Launch the Siebel client. When you click the Custom button, New record will be created as soon as user is navigated to the Contacts view.
Click on the below button:
A new Record is created as shown below: