Using this document, the developer can migrate classic e-Business controls to e-Business 6.0.
For this, we have taken an example of DirectoryMember control from classic e-Business and migrated it to e-Business 6.0. Same steps can be followed for other classic e-Business controls as well.
The DirectoryMember control is accessible to the Company Administrator. The control displays a list of members within the company. The Company Administrator can see the members list and delink a person from the company.
Follow the below steps to migrate classic e-Business controls to e-Business 6.0:
Given below is the LoadMember() method in classic e-Business.
Given below is the image of the directory members list in classic e-Business.
b. Display Members List in e-Business 6.0: The e-Business 6.0 uses the REST API to fetch data.
Use the below JSON endpoint structure to generate the e-Business 6.0 service.
"getAllDirectoryMembers": {
"route": {
"httpMethod": "GET",
"segments": {
"DirectoryMembers": {
"isLiteral": true,
"type": "string",
"security": {
"IsCompanyAdmin": {
"type": "WebGroup",
"parameters": {
"groupList": [ "Company Administrator" ]
}
}
}
}
},
"description": "Retrieves the list of directory members."
},
"inputEntityDefinition": null,
"outputEntityDefinition": {
"isCollection": true,
"$ref": "#/entityDefinitions/directoryMembersOutput",
"name": "directoryMembersOutput"
},
"businessLogic": {
"allDirectoryMembersRetrieval": {
"executionType": "processFlow",
"processFlowProperties": {
"processFlowName": "Execute Data Object",
"processFlowParameters": {
"DataObjectName": "spGeteBusiness6_0DirectoryMemberDetails",
"authenticatedAttributes": "@AuthenticatedAttributes"
}
}
},
"getDirectoryMembersRetrieval": {
"executionType": "processFlow",
"processFlowProperties": {
"processFlowName": "Retrieve Directory Member Details",
"processFlowParameters": {
"PersonId": "@AuthenticatedAttributes.AuthenticatedPrincipalRecordId",
"MembershipStatus": "",
"Month": "3",
"DirectoryMembersDataTable": "@parent.allDirectoryMembersRetrieval.outputDataObjectTable"
}
}
}
}
},
Output Fields Definition:
"entityDefinitions": {
"directoryMembersOutput": {
"fields": {
"id": {
"type": "long"
},
"email": {
"type": "string"
},
"companyId": {
"type": "long"
},
"memberType": {
"type": "string"
},
"title": {
"type": "string"
},
"firstLast": {
"type": "string"
},
"address": {
"type": "string"
},
"startDate": {
"type": "string",
"sourceField": "JoinDate"
},
"endDate": {
"type": "string",
"sourceField": "DuesPaidThru"
}
}
}
}
Given below is the image of Postman Endpoint execution in e-Business 6.0.
We should be able to get a member list using service built above. |
Given below is the image of the directory members list in e-Business 6.0.
2. Delink a person from the company.
a. Delink a person in classic e-Business: The classic e-Business calls a method "RemoveCompanyLinkage" to delink a person from the company. This method is invoked from the button "remove" in classic e-Business.
Given below is the image of RemoveCompanyLinkage method in classic e-Business.
Given below is the list of directory members list to be removed from company in classic e-Business.
b. Delink person from company in e-Business 6.0: To build a service to delink a person from company, follow the below steps:
"removeDirectoryMemberFromCompany": {
"route": {
"httpMethod": "PATCH",
"segments": {
"DirectoryMembers": {
"isLiteral": true,
"type": "string",
"security": {
"IsCompanyAdmin": {
"type": "WebGroup",
"parameters": {
"groupList": [ "Company Administrator" ]
}
}
}
}
},
"description": "Removes directory member from company"
},
"inputEntityDefinition": {
"name": "GetSinglePersonId",
"fields": {
"PersonId": {
"type": "long",
"input": {
"httpMethods": [ "PATCH" ],
"isCollection": true,
"source": "body",
"requiredHttpMethods": [
"PATCH"
]
}
}
}
},
"outputEntityDEfinition": null,
"businessLogic": {
"subscriptionIDRetrieval": {
"executionType": "processFlow",
"processFlowProperties": {
"processFlowName": "Load Subscription Id",
"processFlowParameters": {
"PersonId": "@request.PersonId",
"CompanyId": 1
}
}
},
"getDirectoryMembersRetrieval": {
"executionType": "processFlow",
"processFlowProperties": {
"processFlowName": "Remove Directory Member From Company",
"processFlowParameters": {
"PersonId": "@request.PersonId",
"CompanyId": 1,
"iCnt": 0,
"SubscriptionId": "@parent.subscriptionIDRetrieval.outputIdDataTable"
}
}
}
}
}
We should be able to remove a directory member from company using the service built above. |
Given below is the image showing how to delink a directory member in e-Business 6.0.
Given below is the list of attached process flows, process component and stored procedure packs for reference.
RemoveDirectoryMemberPack1.cmpack
Note:
Following manual instructions need to be followed to update service application record,
2. Update the Auth Context info as below.
3. Save the service application record.