Skip to Content
May 29 at 06:10 PM

Isues with CreateMedia action

75 Views Last edit May 29 at 06:15 PM 4 rev

Hi experts, I have in my app a form to create Sales Activities with an attachment control.

Due to I can have multiple attachments I have created a new entity for attachments with the HasStream="true" attribute. This entity only have the key of the Sales Activity (2 fields) plus a extra field working as a secuence to have a unique key.

The first problem is I realice the key fields aren't saved in offline database so I loose the connection with the parent object.

You can check this in the showcase app ImageHandling. When you create a product and fill the key property "Product ID" , after saving you can check the product and you'll see the property "Product ID" is blank, in spite of the app is setting this property in CreateMedia action.

Is there something I can do in order the key properties are saved ?

The second problem is I show my form in a modal screen in order to group all create entities, according to Ming Kho here and it works but not with CreateMedia. I see in the documentation that CreateMedia doesn't work with ChangeSet.

Besides, despite the fact I do the CreateMedia after the create entities, when I sync, the backend is receiving first the create media requests, so it doesn't respect the secuence.

Is there someting I can do in order to manage the CreateMedia and CreateEntities altogether or at least force the CreateMedia after the CreateEntities ?