내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Web application- java script

Avatar

Level 3

Hi ,

 

Iam trying to create web application to update a field password in custom schema. I created a custom schema userProfile and inserted data. I need to update the field password. For that a web form is created to enter email and new password.

 

ramprakasht3196_0-1585580648914.png

Based on email entered by customer new password will be updated in schema. For that Iam using below javascript 

 

var temp= ctx.vars.emailID;
var tempPassword= ctx.vars.password;
var query = xtk.queryDef.create(
<queryDef schema= "cus:UserProfile" operation="select">
<select>
<node expr="@firstName"/>
<node expr="@lastName"/>
<node expr="@email"/>
<node expr="@password"/>
</select>
<where>
<condition expr="@email = temp"/>

</where>
</queryDef>)

var results = query.ExecuteQuery();

 

xtk.session.Write(<recipient xtkschema="cus:UserProfile" _operation="update" password ={tempPassword} _key="@email"/>);

 

 

Iam unable to update the field inschema.

 

Please help me here.

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

Hi @ramprakasht3196 

 

you should check if your query return anything and if you have enough privileges.

You may try like this:

 

ctx.recipient.@xtkschema="cus:UserProfile";
ctx.recipient.@_operation="update";
ctx.recipient.@_key="@email";
ctx.recipient.@password= {tempPassword} ;


xtk.session.Write(ctx.recipient)

Regards,

MIlan

 

원본 게시물의 솔루션 보기

4 답변 개

Avatar

정확한 답변 작성자:
Level 10

Hi @ramprakasht3196 

 

you should check if your query return anything and if you have enough privileges.

You may try like this:

 

ctx.recipient.@xtkschema="cus:UserProfile";
ctx.recipient.@_operation="update";
ctx.recipient.@_key="@email";
ctx.recipient.@password= {tempPassword} ;


xtk.session.Write(ctx.recipient)

Regards,

MIlan

 

Avatar

Level 3

Thank you. Could you please tell me,  If   i use loginfo statement where to check logs for javascript in web application. 

 

Avatar

Level 10

HI @ramprakasht3196, check the web.log . You should add a prefix to all your logInfo messages by webApp, it will be much easier to filter on a specific webApp message. Regards, Milan

Avatar

Level 1

I started to create web application yesterday but i have some issues in that while creating. Any one suggest  me to do that.