How to get in in X++ //Get Propect type DirPartyTable dirPartyTable = DirPartyTable::findRec(smmBusRelTable::find(...put your prospect here...).Party); //Continue if Prospect type is "Organization" if(dirPartyTable.type() == DirPartyType::Organization) { ....do something... }