on 12-27-2021 1:47 PM
Hello Everyone,
When I try to create offline media entity getting below error though I unset "AttachmentDocumentUUID" while creating it.
Any suggestion here will be helpful. Thanks
viewModel.create(attachmentEntityCopy, media)
com.sap.cloud.mobile.odata.core.UndefinedException: Cannot get property 'AttachmentDocumentUUID' of type 'GuidValue' in entity type 'XXXXXXXx.Attachment', because the value is not set. This exception occurs because an undefined property is considered distinct from a null property (regardless of whether or not the property is defined as nullable in the service metadata). The attempt to access an undefined property may be evidence of a flaw in this client application (trying to access properties in a query result without having requested for the server to return values for the properties, or trying to access property values before initializing them), or may be evidence of a flaw in the service implementation (failing to return properties that were requested by the client application using $select or $expand). Depending on the root cause, options to avoid this exception include: (1) Getting the service implementer to fix the service if it is unexpectedly omitting expected property values in responses; (2) Initializing all properties in newly created objects before trying to access the properties (using the 'setDefaultValues' function, or by specifying 'true' for the 'withDefaults' parameter of the proxy class constructor); (3) Using the 'hasDataValue' function to check if properties are defined before trying to access them; (4) With the dynamic API, using the 'getOptionalValue' function instead of using the 'getDataValue' function
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.