You need to sign in to do that
Don't have an account?
Add new Object with Master-Object with iOS-SDK
Hi Guys,
I'm pretty new to salesforce and haven't worked with it before. I'm currently writing an iPhone Application using the salesforce iOS SDK.
In Salesforce we have an Object "Zeiterfassung__c" with a Master-Object "Kontierungsmonat__c".
Now I'm trying to create a new Object by using requestForCreateWithObjectType. Unfortuantly it fails because i don't have the right ObjectID for Master-Object i want to set up the relation to.
Is there any chance to receive the Object ID from the Master-Object? I can query a list of all Objects from type "Kontierungsmonat__c". But "Kontierungsmonat__c" doesn't have a ID field :(
Let me know if you have any questions.
Thanks for your help!
Daniel
just the clear things:
thats the Request which fails with:
(com.salesforce.RestAPI.ErrorDomain error 999.)" UserInfo=0x6e33eb0 {message=Kontierungsmonat: unzulässiger Typ des ID-Werts: 201201-442, errorCode=MALFORMED_ID, fields=(
"Kontierungsmonat__c"
Currently I'm using a field which has the primary key in it. But is guess i need the Object-ID right? Is there a way to get it via the REST Api?
cheers,
Daniel
Hi Daniel,
Probably the best way to debug this would be to start with the RestExplorer and plug in the request you're trying to make. What I do is typically find the IDs I'm interested in (either via the website or by dumping them out with eg NSLog), and then plug those values into RestExplorer to verify my requests.
You can copy/paste complex values from your Mac into the RestExplorer running on a simulator.
Hope this helps...