diff --git a/src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java b/src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
--- a/src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
+++ b/src/org/openbravo/mobile/core/process/DataSynchronizationProcess.java
@@ -31,7 +31,6 @@
 import org.openbravo.base.model.ModelProvider;
 import org.openbravo.base.structure.BaseOBObject;
 import org.openbravo.client.kernel.ComponentProvider;
-import org.openbravo.client.kernel.RequestContext;
 import org.openbravo.dal.core.OBContext;
 import org.openbravo.dal.core.TriggerHandler;
 import org.openbravo.dal.service.OBDal;
@@ -93,15 +92,18 @@
       throws JSONException {
     boolean error = false;
     List<String> errorIds = new ArrayList<String>();
-    String originalOrg = (String) RequestContext.get().getSession().getAttribute("#AD_ORG_ID");
-    String originalUser = (String) RequestContext.get().getSession().getAttribute("#AD_USER_ID");
-    String originalRole = (String) RequestContext.get().getSession().getAttribute("#AD_ROLE_ID");
+
+    OBContext cnx = OBContext.getOBContext();
+    String originalUser = cnx.getUser().getId();
+    String originalOrg = cnx.getCurrentOrganization().getId();
+    String originalRole = cnx.getRole().getId();
+
     OBContext.setAdminMode(false);
     try {
       for (int i = 0; i < jsonarray.length(); i++) {
-        String currentOrg = (String) RequestContext.get().getSession().getAttribute("#AD_ORG_ID");
-        String currentUser = (String) RequestContext.get().getSession().getAttribute("#AD_USER_ID");
-        String currentRole = (String) RequestContext.get().getSession().getAttribute("#AD_ROLE_ID");
+        String currentUser = cnx.getUser().getId();
+        String currentOrg = cnx.getCurrentOrganization().getId();
+        String currentRole = cnx.getRole().getId();
         long t1 = System.currentTimeMillis();
         JSONObject jsonRecord = jsonarray.getJSONObject(i);
         String userId = jsonRecord.has("createdBy") ? jsonRecord.getString("createdBy")
