Skip to Content
0
May 01, 2018 at 01:38 PM

SAP B1 return default contact in sql script

267 Views Last edit May 02, 2018 at 11:27 AM 2 rev

SAP B1 9.2 PL7

Hi, I want to have a fms (formatted search) that returns just the main default contact setup on a BP.

This script gives me 4 contacts but I only want the default contact so I can pre-fill the email address field on some forms.

SELECT T0.[CardCode], T0.[Position], T0.[Name], T0.[E_MailL] FROM OCPR T0

WHERE T0.[CardCode] ='C207102'

Can anyone advise how to just get the default contact on one line from a script?

(I've tried using SINGLE but can't get it working as I need)

Thanks, Eoin.