When viewing a person record, the person types selected are not on the screen. You need to customise the person before you can see what person types are selected.


There is a way of having a list of the types selected show up in a text field on the screen before it is customised. This can be achieved by following these steps.

• Go into Administration -> Customisation -> Person and add a field called pers_linktypes (with a caption Person Types) and a field length that is long enough to hold all of the possible type names. The entry width does not have to be as large, as you wont actually be typing anything into this field.

• Add this field to the personBoxLong screen

• Go to Table level scripts in person entity

• Create a new table level script and replace the text in the script box with the following:

function UpdateRecord() {
var contextTest = /Pers_PersonId=([0-9]+)/gi;
if (contextTest.test(WhereClause)) {
contextTest.exec(WhereClause); var personId = RegExp.$1;
var SQLString = "SELECT DISTINCT Peli_Type FROM Person_Link "; SQLString+= "WITH (NOLOCK) WHERE Peli_PersonId="+personId+" "; SQLString+= "AND Peli_Deleted IS NULL"
var linkRecords = CRM.CreateQueryObj(SQLString); linkRecords.SelectSql(); var linkTypes = "";
while (!linkRecords.Eof) {
if (linkRecords("Peli_Type") !== undefined) {
linkTypes += linkRecords("Peli_Type") + ", "; } linkRecords.NextRecord(); } Values("Pers_LinkTypes") = linkTypes.substring(0,linkTypes.length-2); }

This is what the person record should now look like.

Screen when completed