You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

Groovy to query only Contacts but not user records

in Sales 2 comments

Hi All,

I have actually written a code to query the Contact object based on email. But the query is also searching for user records with that email and returning the result as record found with that email address . How to restrict the query to only search for records in Contact Object. It shouldn't query in user records.

def email = nvl(Sender,'noreply@****.com');
def pProfileVO = newView('PersonProfile')
pProfileVO.appendViewCriteria("PrimaryEmailAddress = '${email}' AND PartyStatus = 'A' AND InternalFlag = 'N' AND PartyType = 'PERSON' AND SalesProfileType = 'ZCA_PROSPECT'")
pProfileVO.executeQuery()


Regards,
Kalyan

Tagged:

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!