diff --git a/entity/Stock_entity/Stock_entity.aod b/entity/Stock_entity/Stock_entity.aod
index dfae4c28d432d6336ce785d7b4d71155351ba1a1..1a5f8adf5e352fcf198a095268443580b3bb365d 100644
--- a/entity/Stock_entity/Stock_entity.aod
+++ b/entity/Stock_entity/Stock_entity.aod
@@ -8,6 +8,15 @@
   <alias>Data_alias</alias>
   <conditionProcess>%aditoprj%/entity/Stock_entity/conditionProcess.js</conditionProcess>
   <orderClauseProcess>%aditoprj%/entity/Stock_entity/orderClauseProcess.js</orderClauseProcess>
+  <recordContainer>db</recordContainer>
+  <linkInformation>
+    <linkInformation>
+      <name>f8caac29-1e0d-4cf5-9137-fedd6a765d55</name>
+      <tableName>STOCK</tableName>
+      <primaryKey>STOCKID</primaryKey>
+      <isUIDTable v="true" />
+    </linkInformation>
+  </linkInformation>
   <entityFields>
     <entityField>
       <name>DATE_EDIT</name>
@@ -131,12 +140,68 @@
       <name>#INCOMING</name>
     </entityIncomingField>
   </entityFields>
-  <linkInformation>
-    <linkInformation>
-      <name>f8caac29-1e0d-4cf5-9137-fedd6a765d55</name>
-      <tableName>STOCK</tableName>
-      <primaryKey>STOCKID</primaryKey>
-      <isUIDTable v="true" />
-    </linkInformation>
-  </linkInformation>
+  <recordContainers>
+    <dbRecordContainer>
+      <name>db</name>
+      <alias>Data_alias</alias>
+      <maximumDbRows v="0" />
+      <conditionProcess>%aditoprj%/entity/Stock_entity/recordcontainers/db/conditionProcess.js</conditionProcess>
+      <orderClauseProcess>%aditoprj%/entity/Stock_entity/recordcontainers/db/orderClauseProcess.js</orderClauseProcess>
+      <linkInformation>
+        <linkInformation>
+          <name>d291e552-0b6a-48e1-a830-1558beb5f58e</name>
+          <tableName>STOCK</tableName>
+          <primaryKey>STOCKID</primaryKey>
+          <isUIDTable v="true" />
+          <readonly v="false" />
+        </linkInformation>
+      </linkInformation>
+      <recordFieldMappings>
+        <dbRecordFieldMapping>
+          <name>DATE_EDIT.value</name>
+          <value>STOCK.DATE_EDIT</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>DATE_NEW.value</name>
+          <value>STOCK.DATE_NEW</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>ENTRYDATE.value</name>
+          <value>STOCK.ENTRYDATE</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>IN_OUT.value</name>
+          <value>STOCK.IN_OUT</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>PRODUCT_ID.value</name>
+          <value>STOCK.PRODUCT_ID</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>QUANTITY.value</name>
+          <value>STOCK.QUANTITY</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>REFNUMBER.value</name>
+          <value>STOCK.REFNUMBER</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>STOCKID.value</name>
+          <value>STOCK.STOCKID</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>USER_EDIT.value</name>
+          <value>STOCK.USER_EDIT</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>USER_NEW.value</name>
+          <value>STOCK.USER_NEW</value>
+        </dbRecordFieldMapping>
+        <dbRecordFieldMapping>
+          <name>WAREHOUSE.value</name>
+          <value>STOCK.WAREHOUSE</value>
+        </dbRecordFieldMapping>
+      </recordFieldMappings>
+    </dbRecordContainer>
+  </recordContainers>
 </entity>
diff --git a/entity/Stock_entity/recordcontainers/db/conditionProcess.js b/entity/Stock_entity/recordcontainers/db/conditionProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..530b6b4554efcdcae9c8e4568efb959b58b86c5a
--- /dev/null
+++ b/entity/Stock_entity/recordcontainers/db/conditionProcess.js
@@ -0,0 +1,7 @@
+import("system.result");
+import("system.vars");
+
+if(vars.exists("$param.ProductId_param") && vars.get("$param.ProductId_param") != "")
+    result.string("STOCK.PRODUCT_ID = ('" + vars.get("$param.ProductId_param") + "')");  
+else
+    result.string("1 = 2");  
\ No newline at end of file
diff --git a/entity/Stock_entity/recordcontainers/db/orderClauseProcess.js b/entity/Stock_entity/recordcontainers/db/orderClauseProcess.js
new file mode 100644
index 0000000000000000000000000000000000000000..ec31c7395e9c1d4b368d0f9310e4b76f30f11ac1
--- /dev/null
+++ b/entity/Stock_entity/recordcontainers/db/orderClauseProcess.js
@@ -0,0 +1,3 @@
+import("system.result");
+
+result.object( {"STOCK.ENTRYDATE": "down"} );
\ No newline at end of file