Organizations ========================== .. py:data:: model.CurrentOrgId Set this to the OrganizationId that should be used for email replacements. .. py:function:: model.AddMembersToOrg(query, orgid) :param str query: see :doc:`QueryParameter` :param int orgid: The Organization id number to add the person too .. py:function:: model.AddMemberToOrg(pid, orgid) :param int pid: The People id of the individual person to update. :param int orgid: The Organization id number to add the person too. .. py:function:: model.AddOrganization(name, program, division) :return: the OrganizationId :rtype: int :param str name: the name of the org :param str program: the name of the program :param str division: the name of the division Creates a new Organization. The program and division will be created if not already existing. .. py:function:: model.AddOrganization(name, templateid, copysettings) :return: the OrganizationId :rtype: int :param str name: the name of the org :param int templateid: the OrganizationId of the org to be copied :param bool copysettings: the default is to copy the settings, set to False if to prevent. Creates a new Organization. The templateid allows you to use the same program and division of the template org Entrypoint, OrganizationType, Campus, Status are all copied too. If CopySettings is True, the Schedules are copied as well as FirstMeetingDate, LastMeetingDate, Limit, RegistrationType, RegStart, RegEnd, IsMissionTrip and all Registration Fees, Questions and Messages. .. py:function:: model.AddSubGroup(pid, orgid, group) Adds a person to a sub-group in the organization. :param int pid: PeopleId :param int orgid: OrganizationId :param str group: The name of the sub-group .. py:function:: model.AddSubGroupFromQuery(query, orgid, group) Adds multiple org members to a sub-group in the organization using a query. :param str query: see :doc:`QueryParameter` :param int orgid: OrganizationId :param str group: The name of the sub-group It is important to have the query only return members of the org. This function will silently skip persons who are not members of the organization. .. py:function:: model.DropOrgMember(pid, orgid) Drops a person from the organization. :param int pid: PeopleId :param int orgid: OrganizationId .. py:function:: model.InOrg(pid, orgid) :return: True or False whether a person is a member of an organization. :rtype: bool :param int pid: PeopleId :param int orgid: OrganizationId .. py:function:: model.InSubGroup(pid, orgid, group) Determines whether a person is in a sub-group in organization :rtype: boolean :param int pid: PeopleId :param int orgid: OrganizationId :param str group: The name of the sub-group .. py:function:: model.JoinOrg(orgid, person) Adds the person to the organization as a regular member. :param int,Person person: this can either be a Person object or a PeopleId int :param int orgid: OrganizationId .. py:function:: model.MoveToOrg(pid, fromOrg, toOrg) Drops person from one org and adds them to another. :param int pid: PeopleId :param int fromOrg: OrganizationId for current membership to drop :param int toOrg: OrganizationId for new membership to add to .. py:function:: model.OrganizationIds(progid, divid, *includeinactive) :return: A list of Organization ids in the respective program and division :rtype: Enumerable list of int :param int progid: The id number of the Program, or 0 for any program. :param int divid: The id of the Division, or 0 for any division. :param bool includeinactive: \*optional default=False. By default no inactive organizations will be included. Pass True to include them. .. py:function:: model.RemoveSubGroup(pid, orgid, group) Removes a person from a sub-group in the organization. :param int pid: PeopleId :param int orgid: OrganizationId :param str group: The name of the sub-group .. py:function:: model.SetMemberType(peopleid, orgid, type) :param int pid: PeopleId :param int orgid: OrganizationId :param str type: Sets the MemberType of the person in the org A new MemberType will be created if no type of that name exists. .. py:function:: model.UpdateMainFellowship(orgid) :param int orgid: Updates MainFellowship flag on all members, and MemberCounts. .. py:function:: model.AdjustFee(peopleId, orgId, adjustmentAmount, description) :return: The ID of the successfully-added transaction or null if there was a failure :rtype: int :param int peopleId: The PeopleId for the involvement member for whom you are adding the transaction :param int orgId: The OrganizationId for the involvement :param decimal adjustmentAmount: The amount to adjust the fee; a negative number increases the fee :param str description: Corresponds to the Description field when manually entering a transaction; contents will display when viewing the information icon The parameters for adjustmentAmount and description correspond to information entered when manually adjusting the fee via the Member Dialog interface. .. py:function:: model.AddTransaction(peopleId, orgId, payment, description) :return: The ID of the successfully-added transaction or null if there was a failure :rtype: int :param int peopleId: The PeopleId for the involvement member for whom you are adding the transaction :param int orgId: The OrganizationId for the involvement :param decimal payment: The amount of payment :param str description: Corresponds to the Description field when manually entering a transaction; contents will display when viewing the information icon The parameters for payment and description correspond to information entered when manually adding a transaction via the Member Dialog interface. .. py:function:: model.AddTransaction(peopleId, orgId, reason, payment, description, amount = null, adjustFee = false, pmtDescription = null) :return: The ID of the successfully-added transaction or null if there was a failure :rtype: int :param int peopleId: The PeopleId for the involvement member for whom you are adding the transaction :param int orgId: The OrganizationId for the involvement :param str reason: The reason, e.g., Adjustment or AdjustFee, will appear in the Transaction ID column on the Transactions Log page :param decimal payment: The amount of payment :param str description: Corresponds to the Description field when manually entering a transaction; contents will display when viewing the information icon :param decimal amount: The charged amount (or fee); this only needs to be supplied for initial transactions where you are setting the fee; will override the amount due before this transaction :param bool adjustFee: Flag to indicate whether this transaction is a fee adjustment :param str pmtDescription: Typically this is the involvement name This fuller version of the AddTransaction function should be used with caution and only when all the options are understood. When possible, use instead the shortened version of the function or the AdjustFee function. | | +--------------------+------------------+ | **Latest Update** | **11/11/2021** | +--------------------+------------------+ Added the functions for AddTransaction and AdjustFee.