none
Import ReferenceValue in ECMA (Generic Rest MA) RRS feed

  • Question

  • Hello all.

    I'm using the Generic Rest MA to import objets coming from a Rest WS. One of the attribute of my object is an ID which represent the ID of the parent object. They organizational units so the attribute is parentEntityId. So what I want is that during the import, I want to generate a reference attribute in the CS to import it into the MV as as reference.

    The issue is that the value I try to process (the ID) is a string and I don't know how to change it into a reference. I've tried many things but what I undestrand is that from the ECMA code of the Generic Rest MA source code, I cannot acces my MA to do something like ma.CreateDN. I've defined my attribute as a reference in CS schema (GetSchema) but obviouly when I do the import I've invalid-attribute-value error because in fact the value I get when calling the rest WS is a string.

    Do someone know how to instantiate a ReferenceValue from a string ?

    Is there any known trick to import attribute as reference in ECMA ?

    Regards.

    Friday, August 4, 2017 1:08 PM

All replies

  • Hi,

    You can't change the datatype through a rules extension.  A workaround is to load the parent attribute and its reference into an intermediate SQL table where you can then set the reference attribute as a reference.  The SQL MA will allow you to set an attribute as a reference as shown below. The parent and its reference need to be identified as such and come in through the same MA (source). 

    Best,

    Jeff Ingalls

    Sunday, September 17, 2017 3:31 PM
  • Hi,

    can you help me with the setup.exe file for this generic RestMa

    Tuesday, May 7, 2019 12:20 PM