.. done Member Profile Automation for Deceased Only =========================================== If your church does not want to use the automated member profile for recording church membership changes, but you would like to use just the portion of that process that updates records for deceased individuals, you can replace the existing Text File with the code below. If you are not familiar with the automated process you will want to look at that help article before making the decision about using all of it or just the part that affects deceased persons. .. seealso:: :doc:`../People/MembershipProcess` How this Works -------------- If you decide to use the Member Profile Automation, but only want it as it relates to a deceased person, here is how that works. Step 1 The user with Membership role will enter a Deceased Date on the Profile tab on a person's record and click `Save Changes`. This is the same process whether the deceased person is a church member or not. .. note:: Do not use the Drop Type to flag a person as Deceased. Always enter a Deceased Date on the person's record. If the person was a Member, they will be assigned a Drop Type of Deceased. Step 2 There are quite a few changes that take place automatically both on the record of the deceased person, but also on the record of a surviving spouse if there is one. These changes are outlined in the following article. .. seealso:: :doc:`../People/DeceasedMembers` Change Member Profile Automation -------------------------------- Here are the steps to follow in order to use only the part of the automation process that affects a deceased record. Step 1 Go to `Admin > Advanced > Settings > System > Administration` and make sure that the value beside `UseMemberProfileAutomation` is ``true``. This must be set to **true** even when using only the deceased part of the process. Step 2 Go to `Admin > Advanced > Special Content > Text Content` and select the file named **MemberProfileAutomation**. Step 3 Click inside where you see the code and use Control A to select everything and then hit `Delete`. You want to remove all the text as you will replace it with the text below. Step 4 Highlight all the code below, right-click and select **Copy**. Then return to the Member Profile Automation Text File and use **Control V** (or right-click) to paste the text into the file. Then `Save Changes`. With this code in place when someone is given a Deceased Date, all the changes outlined in the article referenced above will take place. .. code-block:: python # this is an IronPython script for MembershipAutomation in BVCMS # the variable p has been passed in and is the person that we are saving Member Profile information for #import useful constants (defined in constants.py) from constants import * # cleanup for deceased and for dropped memberships def DropMembership(p, Db): if p.MemberStatusId == MemberStatusCode.Member: if p.Deceased: p.DropCodeId = DropTypeCode.Deceased p.MemberStatusId = MemberStatusCode.Previous p.DropDate = p.Now().Date if p.Deceased: p.EmailAddress = None p.DoNotCallFlag = True p.DoNotMailFlag = True p.DoNotVisitFlag = True if p.SpouseId != None: spouse = Db.LoadPersonById(p.SpouseId) if p.Deceased: spouse.MaritalStatusId = MaritalStatusCode.Widowed if spouse.EnvelopeOptionsId != None: # not null if spouse.EnvelopeOptionsId != EnvelopeOptionCode.NoEnvelope: spouse.EnvelopeOptionsId = EnvelopeOptionCode.Individual spouse.ContributionOptionsId = EnvelopeOptionCode.Individual if spouse.MemberStatusId == MemberStatusCode.Member: if spouse.EnvelopeOptionsId == EnvelopeOptionCode.Joint: spouse.EnvelopeOptionsId = EnvelopeOptionCode.Individual p.EnvelopeOptionsId = EnvelopeOptionCode.NoEnvelope p.DropAllMemberships(Db) #------------------------------------- # Main Function class MembershipAutomation(object): def __init__(self): pass def Run(self, Db, p): p.errorReturn = "ok" if p.DeceasedDateChanged: if p.DeceasedDate != None: DropMembership(p, Db)