cancel
Showing results for 
Search instead for 
Did you mean: 

GeneralDataParams used inside AppDomain returns non serializable exception on System Dynamic

Former Member
0 Kudos

Hi,

I'm currently performing an update through the SAP DI inside a new AppDomain. For creating this instance in the newAppDomain all the classes related must have the [Serializable] attribute. Creating and reading works for me but for updating and deleting i use Generaldataparams and I execute the following code :

  var dataParams = ((GeneralDataParams)(service.GetDataInterface(SAPbobsCOM.GeneralServiceDataInterfaces.gsGeneralDataParams)));

               

       dataParams.SetProperty(entity.Metadata.PrimaryKey.Value.Name, entity.PrimaryKeyValue);

When i execute the second line the next Exception is being returned;

Der Typ "System.Dynamic.IDispatchComObject" in Assembly "System.Dynamic, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" ist nicht als serialisierbar gekennzeichnet.

Have anyone experienced something similar?

This method is inside a Serializable class. I have also tried to set a private static field _dataParams with the [NonSerialized] attribute but its still not working.

Have someone any clue?

Thanks in advance

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member183750
Active Contributor
0 Kudos

Hi

Please note the description in the Overview of each SCN Space to make sure you post to the correct one. E.g.; this Space:

My guess is that you want to post here:

- Ludek

SCN Modetator

Senior Support Engineer AGS Product Support, Global Support Center Canada

ErvinSzolke
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi Ludek,

are you sure this is NWDI ? It is not clear to me from the initial description.

The abbreviation DI is often incorrectly associated with Development Infrastructure (for example sometimes we receive issues when the problem is about Dialog Instance but only the DI abbreviation is used)

If it is feel free to move it to our space.

Thank you, Ludek!

Best Regards,

Ervin