Thursday, May 21, 2015

Importing a V4.2 APEX application into APEX V5 (and changing the theme)

I thought I’d see how easy or hard it is to import a V4.2 application into V5. Short answer - very easy.

Create a schema in the target database, probably a good idea to make it the same as the source so that the import is easy.

Export the application tables / data from the source database and import it into the target so that the APEX app will work. No data, no work.

Export the application from the V4.2 APEX environment - it gets output as an SQL file.


Create a new workspace in the V5 APEX environment.

Sign in as Admin and click on ‘Manage Workspaces /  Create Workspace’:


Give it a name, and click ‘Next’:


Select ‘Yes’ and choose the schema (or create a new one if you like):


Click ‘Next’

Enter the Admin details:

Click 'Next


If the details are OK, click ‘Create Workspace’.



Click ‘Done’.

Now, create the APEX user and assign the workspace. Click on ‘Manage Workspace / Manage Developers and Users’:


Click 'Create User'


Enter the details, I tend to allow the user to be an administrator in a Test environment because it’s me doing the development.



I also tend to set the password and not change it on first login:


Click 'Create User'


Log out of the ADMIN user and in as the new user


Click on ‘Application Builder / Import’


Click on ‘Choose File’ and browse to the exported V4.2 sql file




Click ‘Next’

If all OK, click ‘Next’ to install


I like to keep the application id, it’s up to you.



Click ‘Install Application’

Once done, click ‘Next’



Click ‘Install’


If all goes well, the application will be installed


Click on ‘Run Application’ (or edit if you like)
.
Looks the same as the V4.2 version (data obscured for obvious reasons)


So that I can make sure I don’t get confused between the live app and the one I've just imported, I decided to change the theme to distinguish them. This is also useful to know in case you want to change the style of an application later after creation.

First, you need to create a new theme for the application, based on an existing one.

Click on ‘Application nnnn’ in the edit bar:


At the top right, click on the ‘Shared Components’ icon:


In the middle of the page, click on the ‘Themes’ link


Click on the ‘Create’ button:


Select ‘From the Repository’ and click ‘Next'


Leave ‘Desktop’ and click ‘Next’


Select ‘All Themes’ and pick a theme from the drop-down:



Click ‘Next’

Click ‘Create’

The theme will now appear:


At the top-right, click ‘Switch Theme’


Select the themes from the drop-down menus


Click 'Next'


If all OK, click 'Next'


Click on 'Switch Theme'


The new theme will now be set as the current:one


Click on the ‘Application nnn’ at the top left of the page to return to the main page:


Click on ‘Run Application’ to see the new theme:



So, importing from a V4.2 application and switching the theme is pretty straight forward.

























No comments:

Post a Comment