diff --git a/applications/datamodel/entitydef/party-entitymodel.xml b/applications/datamodel/entitydef/party-entitymodel.xml
index 951786d707..5c1206e6aa 100644
--- a/applications/datamodel/entitydef/party-entitymodel.xml
+++ b/applications/datamodel/entitydef/party-entitymodel.xml
@@ -2639,6 +2639,7 @@ under the License.
+
@@ -2648,6 +2649,9 @@ under the License.
+
+
+
setPartyStatus(DispatchContext ctx, Map context) {
Delegator delegator = ctx.getDelegator();
Locale locale = (Locale) context.get("locale");
+ GenericValue loggedInUserLogin = (GenericValue) context.get("userLogin");
String partyId = (String) context.get("partyId");
String statusId = (String) context.get("statusId");
@@ -249,6 +253,9 @@ public class PartyServices {
// record this status change in PartyStatus table
GenericValue partyStatus = delegator.makeValue("PartyStatus", UtilMisc.toMap("partyId", partyId, "statusId", statusId, "statusDate", statusDate));
+ if (loggedInUserLogin != null) {
+ partyStatus.put("changeByUserLoginId", loggedInUserLogin.get("userLoginId"));
+ }
partyStatus.create();
// disable all userlogins for this user when the new status is disabled
@@ -429,6 +436,9 @@ public class PartyServices {
// create the status history
GenericValue partyStat = delegator.makeValue("PartyStatus",
UtilMisc.toMap("partyId", partyId, "statusId", statusId, "statusDate", now));
+ if (userLogin != null) {
+ partyStat.put("changeByUserLoginId", userLogin.get("userLoginId"));
+ }
partyStat.create();
}