Impossible to update. Creation of new recipient profile is not allowed. Unsubscribe and subscribe | Community
Skip to main content
Heku_
Level 5
November 29, 2023
Solved

Impossible to update. Creation of new recipient profile is not allowed. Unsubscribe and subscribe

  • November 29, 2023
  • 2 replies
  • 949 views

Hello, I get this error trying to subscribe recipients to services via javascript:

My code is like this, I query the target schema and I subscribe or unsubscribe with a non empty email that has a existing recipient, and in @2275143 there is the service.

Any idea? @Manoj_Kumar_ @ParthaSarathy @Parvesh_Parmar @DavidKangni

Thank you in advance.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Manoj_Kumar

Hello @heku_ 

 

Try chaging the _key from @email to @id

 

Your code will look like this:

 

var recipient =<recipient _key = "@id" id = {e.@id} /> // assuming e.@id is the recipient id nms.subscription.Subscribe(e.@sub,recipient,false)

 

If you don't have the recipient id value in the targetData then query the recipient with email address and then pass the object or recipient id.

 

2 replies

Craig_Thonis
Adobe Employee
Adobe Employee
November 29, 2023

Hi Heku,

 

I found a few internal bug references for this, and it appears to occur because of a limitation seen when webApps are going through stage, and no prefill is done. Meaning, either no prefill activity is present or a prefill activity with "Skip preloading if no ID" is checked.

 

The limitations listed for this are NEO-33769 and NEO-33770. Once addressed these references should be listed in the build release notes.

Heku_
Heku_Author
Level 5
November 30, 2023

Hello, thank you for your reply, but this script is not from a webapp.

Manoj_Kumar
Community Advisor
Manoj_KumarCommunity AdvisorAccepted solution
Community Advisor
November 29, 2023

Hello @heku_ 

 

Try chaging the _key from @email to @id

 

Your code will look like this:

 

var recipient =<recipient _key = "@id" id = {e.@id} /> // assuming e.@id is the recipient id nms.subscription.Subscribe(e.@sub,recipient,false)

 

If you don't have the recipient id value in the targetData then query the recipient with email address and then pass the object or recipient id.

 

Manoj  | https://themartech.pro
Heku_
Heku_Author
Level 5
November 30, 2023

The problem was initializing in two steps the recipient to update, solved with:

var recipient = {recipient: {_key: "id", id: e.@id.toString()}};

 

Thank you!