I had followed this trailheadand the github code. Successfully apply to one of my org, but when I'm trying to copy to the another org, somehow it's not working. I had adjust the variety of cloudpage ID, subscriberkey and email. But, when I send an email to myself and click the cloudpage link, I'm not able to successfully log in my subscribe data.
<div style="display:none;">
%%[
SET @SubscriberKey = [_subscriberkey]
SET @EmailAddress = [emailaddr]
IF EMPTY(@SubscriberKey) OR EMPTY(@EmailAddress) THEN
SET @error = true
ELSE
SET @preferenceCenterLink = CloudPagesURL(3490)
SET @Status = 'Unsubscribed'
SET @results = UpsertData('MBPassUnsubscribeList',2, 'EmailAddress', @EmailAddress, 'SubscriberKey', @EmailAddress, 'EDMStatus', @Status, 'ModifiedDate', Now())
SET @vv1 = CreateObject("RetrieveRequest")
SetObjectProperty(@vv1, "ObjectType", "Subscriber")
AddObjectArrayItem(@vv1,"Properties","SubscriberKey")
AddObjectArrayItem(@vv1,"Properties","EmailAddress")
AddObjectArrayItem(@vv1,"Properties","Status")
SET @mbv2 = CreateObject("SimpleFilterPart")
SetObjectProperty(@mbv2, "Property", "SubscriberKey")
SetObjectProperty(@mbv2, "SimpleOperator", "equals")
AddObjectArrayItem(@mbv2, "Value",@SubscriberKey)
SetObjectProperty(@mbv2, "Filter", @mbv2)
SET @ResultSet = InvokeRetrieve(@mbv2)
IF Rowcount(@ResultSet) == 1 THEN
SET @row = ROW(@ResultSet,1)
IF Field(@row,"Status") != @Status THEN
SET @sub = CreateObject("Subscriber")
SetObjectProperty(@sub,"EmailAddress", @EmailAddress)
SetObjectProperty(@sub,"SubscriberKey", @SubscriberKey)
SetObjectProperty(@sub,"Status",@Status)
SET @options = CreateObject("UpdateOptions")
SET @save = CreateObject("SaveOption")
SetObjectProperty(@save,"SaveAction","UpdateAdd")
SetObjectProperty(@save,"PropertyName","*")
AddObjectArrayItem(@options,"SaveOptions", @save)
SET @update_sub = InvokeUpdate(@sub, @update_sub_status, @update_sub_errorcode, @options)
ENDIF
ENDIF
ENDIF
]%%
</div>
<div class="content-wrapper">
<div class="pref-block-noborder form-wrapper-noborder">
%%[@SubscriberKey]%%
%%[@EmailAddress]%%
%%[ IF @error THEN ]%%
<div class="pref-block-noborder form-wrapper-noborder">
<p class="slds-text-heading_small" style="font-size: 1.45rem"> Error </p>
</div>
%%[ ELSE ]%%
<div class="pref-block-noborder form-wrapper-noborder">
<p class="slds-text-heading_small" style="font-size: 1.45rem">
Thank you!You had successfully unsubscribe.
</p>
</div>
%%[ ENDIF ]%%
</div>
</div>
- SSL is working.
Hope there's anyone can give me some hint.
Thanks a lot!
Best, Victoria
CloudPagesURL(3490)
...MBPassUnsubscribeList
is valid and relevant DE.