Give your show custom dialog a message such as "A record with this social security number already exists. Discard this new record and view the existing one?" and keep the default OK and Cancel buttons or rename them if you wish.
Then the next step of the show custom dialog:
If [ Get ( LastMessageChoice ) = 1 //Ok was clicked ]
Go To Related Record [Show only related records; From table: Client Profile Search; Using layout: <Curent Layout>)]
Go to Record/request/Page [ Last ]
Delete Record [no dialog]