!--a11y-->
Settings
for WorkProtect Mode 
To use the WorkProtect function, each portal application must satisfy the following requirements:
· Maintain the “Dirty” indicator
· Adjust the portal links

The function is currently only supported by CRM.
The user can
personalize the behavior of the WorkProtect function. For more information,
see
Personalizing Your
Portal.
The portal application must maintain a special status (“dirty” indicator) that informs the portal that there is unsaved work or data. The Client Framework contains two JavaScript methods with read and write access:
EPCM.setDirty(boolean flag)
EPCM.getDirty()
In a typical scenario, the portal application sets the “dirty” indicator when the user enters a new value into an input field. The “dirty” indicator is reset when the user saves the value (for example when the user clicks on Save).
The portal can only check the current „dirty“ indicator and perform the navigation without losing data if the portal application replaces all the links that can destroy the contents of the Content Area with links having the following syntax (analogous to New Navigation Model / WorkProtect Mode, section Cross Navigation):
<A HREF=”myLink” onclick=”return EPCM.doNavigate(‘any_PCD_URL’)”>
Parameter <any_PCD_URL> defines the location of a page (location of page) or External Service (location of external service) in the user role. Constants must be enclosed in quotation marks.

You can find
the correct value for the page in the Role Editor.
Make sure that you update the relevant parameter values for <PCD_URL>
in the secondary links and navigation targets when
you change the role structure. Both must be synchronized.
You can change the following settings:
· Standard navigation behavior for unsaved data in portal applications
· Personalization by the end user
· Appearance of the newly opened window if WorkProtect mode is active
1. Choose System Administration ® System Configuration ® Service Configuration.
2. Choose Portal Catalog ® Browse.
3. Navigate to the epcfloader portal service and change to edit mode.

The epcfloader service file is in subfolder Services of application com.sap.portal.epcf.loader.
4. Define values for the following properties:
Property |
Value |
Meaning |
workprotect.mode.default |
1 |
Protect unsaved data by opening a new browser window (standard setting) |
2 |
Unsaved data is lost |
|
3 |
Required behavior can be selected each time the popup appears |
|
workprotect.mode.personalize |
on |
End users can
personalize the behavior. |
off |
End users cannot personalize the behavior. The behavior is defined globally by the value for property workprotect.mode.default. |
|
workprotect.window.features |
|
Defines the
appearance of the newly opened window. |
5. Choose Save.
6.
Perform a
restart of the Portal
service epcfloader.
Test tool: com.sap.portal.epcf.loader.Dirty
This test tool supports you in finding and correcting any problems. You can find the tool under System Administration ® Support ® Support Desk in the area Client Framework.
