Hi All, I am currently working in Adobe V8. I have created a schema using autopk and also gave there a pk sequence. But when I am trying to insert data into that schema using xtk.session.Write unable to find key values of elements . I am attaching code and error syntax .
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
Hello @AnushkaMukherjee
It looks like you are on FFDA mode of v8.
Use xtk:session.Ingest method to insert data.
Reference link: New Campaign v8 APIs | Adobe Campaign
Hello @AnushkaMukherjee
Remove the _key="@id" from the code and try again.
_key attribute is required for update operations.
Views
Replies
Total Likes
Again error .
Views
Replies
Total Likes
Change
firstName={Anushka}
to
firstName= "Anushka"
{} is for variable and "" is used for strings
still not working
Views
Replies
Total Likes
Could you please share the schema structure of the eps: customer?
Views
Replies
Total Likes
here are the structures.
Views
Replies
Total Likes
Hello @AnushkaMukherjee
It looks like you are on FFDA mode of v8.
Use xtk:session.Ingest method to insert data.
Reference link: New Campaign v8 APIs | Adobe Campaign
Hi @AnushkaMukherjee ,
Please try giving this way
xtk.session.Write(<customer _operation="insert" leadId="102" xtkschema='eps:customer' /> );
Please try with both leadId=102 once and leadId="102" with the above syntax and let me know.
Also try giving xtkschema Syntax at the end.
Regards,
Pravallika.
Views
Replies
Total Likes
Same error .
Views
Replies
Total Likes
Hi @AnushkaMukherjee ,
Please try by inserting a record using the Data Loading activity into this Schema and check whether the autopk is working fine.
If yes, and it is only the issue with xtk.session.Write, then please try running the below SQL Code
alter table <SQLTableNameinPreviewTab > alter <PrimaryKey'sInternalName> set default nextval('<pkSequenceValueinPreviewTab>' );
and let me know of this works.
Regards,
Pravallika.
Views
Replies
Total Likes
Hi @AnushkaMukherjee ,
Try below Script,
vars.leadId = 1234;
xtk.session.Write(<customer _operation="insert" leadId={vars.leadId} xtkschema='eps:customer'/> );
With the above Script am able to insert a record in schema with leadId as 1234.
And in your console version, if you still face error for xtk.session.Write, alternatively you can try below script,
vars.leadId = 1234;
sqlExec("insert into EpsCustomer (iLeadId) values ('"+ vars.leadId + "');");
Views
Replies
Total Likes
Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies