cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Flexible Search for fetching Email

0 Kudos
469

I am very new to SAP Commerce and have been experimenting with Flexible search. Some queries work i.e and some dont.

Below one works fine. <br/>

1) Select * {User} SELECT {user.pk} FROM {User AS user}

2) SELECT {user.pk}, {ItemType} FROM {User AS user}

However when I am fetching email or uui, it is just not working. <br/>

1) SELECT {email} FROM {User AS user}

2) SELECT {originaluid} FROM {User AS user}

I have tried with {p_ as well which didn't work either.

1) SELECT {email} FROM {User AS user}

2) SELECT {p_originaluid} FROM {User AS user}

It's giving the same error for all the nonworking(wihth the different column names i.e p_originaluid) ones Exception message:

cannot search unknown field 'TableField(name='p_email',langPK='null',type=User)' within type User unless you disable checking, infoMap=TypeInfoMap for type = 8796093939794 code = User superType = 8796093841490 itemTable = users UPTable = usersup LTableName = userslp PropsTable = userprops core fields = owner = [owner,OwnerPkString,class de.hybris.platform.util.ItemPropertyValue] modifiedtime = [modifiedtime,modifiedTS,class java.util.Date] itemtype = [itemtype,TypePkString,class de.hybris.platform.util.ItemPropertyValue] creationtime = [creationtime,createdTS,class java.util.Date] pk = [pk,PK,class de.hybris.platform.core.PK] unlocalized fields = consentreference = [consentReference,p_consentreference, class java.lang.String] description = [description,p_description, class java.lang.String]

A bit of help will be great on the below questions:

1) Considering the above scenario why am I able to fetch all the columns?

2) While doing a flexible search I found "SELECT TypePkString FROM {User AS user}" query, my question is since TypePkString is a database column why is it used with SELECT without curly braces?

Accepted Solutions (0)

Answers (1)

Answers (1)

romitchhabra
Participant
0 Kudos

Hi Syed,

email & originaluid are not there in User. They are part of Customer. Try

select {email},{originaluid} from {Customer}

Hope it helps.