Skip to main content
Milan_Vucetic
Level 9
Aug 28, 2019 1:00 PM UTC
Solved

phone - dataPolicy

Hi all,

I managed to bypass default dataPolicy = "phone" on mobilePhone field in nms:recipient (shema nms:recipient extended and set dataPolicy = "none" ) which enables us storing mobile number as string in prefered format.

But there is a problem with insert mobile phone in Seed addresses (below) where is used  above mentioned field mobilePhone linked from nms:recipient (for which dataPolicy is already bypassed).

Regex is adding extra space and "+" character in any case and I am unable to bypass this.

I tried to extend nms:seedMember as nms:recipient but without success.

Any idea?

Regards,

Milan

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DavidKangni
DavidKangniAccepted solution
Adobe Champion and Community Advisor
Sep 5, 2019 2:38 PM UTC

milanv69354962​

It was missing a piece in your extension schema. Add this xml before the </srcSchema>. and rename cus to your namespace

  <element desc="Seed to insert in the export files" img="nms:unknownad.png" label="Seed addresses"

           labelSingular="Seed" name="seedMember">

    <element aggregate="cus:seedMember:common"/>

  </element>

Thanks

David

David Kangni

12 replies

DavidKangni
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Aug 29, 2019 12:42 AM UTC

Hi Milan,

See the default seedMember schema, it's using nms:recipient as template.You will need to extend the seedMember schema with your extended recipient as template (see screenshot below)

Thanks

David

Translate
David Kangni
Milan_Vucetic
Level 9
Aug 29, 2019 6:47 AM UTC

Hi,

that does not work for me.

Constraint is always there when check field properties and I am trying to find a way to set constraint to No Value by default.

When I change manually it works, but somehow this is reseted after some time again.

I would like to solve this through schema extension to be always safe, but it does not work for some reason.


Regards,

Milan

Translate
DavidKangni
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Aug 29, 2019 1:00 PM UTC

Hi Milan,

That weird i try on a VM and it's working. Otherwise just remove the template in the xml attributes and add dataPolicy and type.

Thanks

Translate
David Kangni
Milan_Vucetic
Level 9
Aug 30, 2019 8:10 AM UTC

Hi David,

you are right. Your solution works on fresh installation of Adobe Campaign (checked on VM).

Well, my problem persist  on my prod instance, because there is another additional element (below) with the same name in default seedMember schema. I think this stops your solution to work properly.

This additional element is located after first element (below) with defined templates (I have used your screenshoot, ignore green line)

How can I bypass this element with the same name as element which is already bypassed?

Regards,

Milan

Translate
pablo_rosero1
Level 9
Sep 3, 2019 7:26 PM UTC

Hi davidk23955130​,

Thanks for helping out and making a difference in our community!

Please check out Milan's latest response.

Thanks,

Pablo

Translate
DavidKangni
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Sep 4, 2019 3:08 PM UTC

Hi Milan,

Can you please provide a scrennshot of wht you're seeing?

Again below is an example of what you should have in your extended seedMember schema. it will overwrite the default one

The red scratches are used to hide my client namespace. So just replace by the namespace you're using.

Translate
David Kangni
Milan_Vucetic
Level 9
Sep 5, 2019 1:21 PM UTC

Hi David,

I am still struggling with this. As mentioned, your solution works on fresh install of ACM (tried on VMs).

Once again, this is how part of default schema looks like:

This is how it looks my extension of nms:seedMember:

Black fields referencing extension of nms:recipient schema.
You will notice common element. Tried without this element and schema preview looks as default one.

With this element schema preview looks like this: (which is fine I would say, but does not work)

Interesting is that there is another element  (below) with name "custom_nms_recipient" in default nms:seedMember schema.

<element name="custom_nms_recipient">

      <attribute dataPolicy="phone" default="@phone" name="mobilePhone" user="true"/>

      <attribute dataPolicy="phone" name="phone"/>

      <attribute dataPolicy="phone" name="fax"/>

    </element>

Is it possible to overwrite these two elements with the same name in schema extension?

Regards,

Milan

Translate
DavidKangni
Adobe Champion and Community Advisor
DavidKangniAdobe Champion and Community AdvisorAccepted solution
Adobe Champion and Community Advisor
Sep 5, 2019 2:38 PM UTC

milanv69354962​

It was missing a piece in your extension schema. Add this xml before the </srcSchema>. and rename cus to your namespace

  <element desc="Seed to insert in the export files" img="nms:unknownad.png" label="Seed addresses"

           labelSingular="Seed" name="seedMember">

    <element aggregate="cus:seedMember:common"/>

  </element>

Thanks

David

Translate
David Kangni
Milan_Vucetic
Level 9
Sep 6, 2019 6:38 AM UTC

HI David,

after adding this xml, seed addresses form throws an error: 

Attribute 'folder-id' unknowns (see definition of schema 'Seed addresses (nms:seedMember)').

XTK-170036 Unable to parse expression '[@folder-id] = 1272'

Probably it is referencing on this xml in the default nms:seedMember schema:

<element autopk="true" folderLink="folder" folderModel="nmsSeedList" img="nms:unknownad.png"

           name="seedMember">

    <compute-string expr="@label"/>

    <key name="name">

      <keyfield xpath="@internalName"/>

    </key>

Regards,

Milan

Translate
DavidKangni
Adobe Champion and Community Advisor
Adobe Champion and Community Advisor
Sep 8, 2019 7:58 PM UTC

can you make sure all  elements are closed correctly or check through a query on xtk folder which folder has the id 1272?

Translate
David Kangni