Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Using function imports (SP05)

$
0
0

Hey there,

 

I'm stuck here with the scheduleFunction: and hope someone here could help.

 

 

Using an older SDK version, my colleagues were creating a POST request against the URL ....

/EditContact?Guid=binary'4689F61E8E380831E10080000A64C800’

... without providing a body to initiate some services in the backend.

 

Essentially by taking a look at the service schema this is a function import, so I'm now trying to use the specific method in SODataStoreAsync to call this URL.

 

 

Based on ...

[[[[onlineStore metadata] metaEntityContainerForName: @"someContainer"] functionImportForName: @"EditContact"] callMethod]

... I can already see that the onlineStore is correct about using POST and it seems to be set up correctly overall.

 

 

 

But I'm not sure about how to call  [SODataOnlineStore scheduleFunction:delegate:options:] correctly...

 

I've tried different ways, basically like this:

 

    [self.onlineStorescheduleFunction:@"EditContact?Guid=binary'4689F61E8E380831E10080000A64C800'"delegate:selfoptions:nil];


    [self.onlineStorescheduleFunction:@"EditContact"delegate:selfoptions:@{@"Guid" : @"4689F61E8E380831E10080000A64C865"}];


    [self.onlineStorescheduleFunction:@"EditContact"delegate:selfoptions:@{@"Guid" : [@"4689F61E8E380831E10080000A64C865"dataUsingEncoding: NSUTF8StringEncoding]}];


    SODataGuid *prop = [[SODataGuidalloc] initWithString32: @"4689F61E8E380831E10080000A64C865"];

    [self.onlineStorescheduleFunction:@"EditContact"delegate:selfoptions:@{@"Guid" : prop}];


All of them throw an error:

Error Domain=ContractViolationDomain Code=6 "The operation couldn’t be completed. (ContractViolationDomain error 6.)" UserInfo=0x170672440 {Payload type is unknown. It must be entity, entitySet or link.=NSLocalizedDescription}




Any ideas/hints would be much appreciated :-)


Thanks!

Björn


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>