on 08-22-2016 2:59 PM
Hello Expert,
I am calling Create method of oData to create Partners. I attached method attachRequestCompleted to model.
While debugging i can see the response Text from server which contains all the fields of the partner.
My query is how to pick partner field value from response Text so that i could show it in messageToast.
Thanks,
Abhi
is it a json object?
obj.obj.obj.finallyyourproperty
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Jun,
Below is the screen shot of the response that i am getting from oDataModel.attachRequestCompleted
responseText :
"{"d":{"__metadata":{"id":"/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/BusinessPartnerSet('0100000070')","uri":":443/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/BusinessPartnerSet('0100000070')","type":"/IWBEP/GWSAMPLE_BASIC.BusinessPartner","etag":"W/\"datetime'2016-08-23T20%3A07%3A15.0270000'\""},"Address":{"__metadata":{"type":"/IWBEP/GWSAMPLE_BASIC.CT_Address"},"City":" blore","PostalCode":" 676","Street":" test","Building":" f2","Country":"IN","AddressType":"02"},"BusinessPartnerID":"0100000070","CompanyName":" Comp","WebAddress":" www.gmail.com","EmailAddress":" emailat@gmail.com","PhoneNumber":" 676876876","FaxNumber":" 676797879","LegalForm":" 676797879","CurrencyCode":"INR","BusinessPartnerRole":"01","CreatedAt":"\/Date(1471982835027)\/","ChangedAt":"\/Date(1471982835027)\/","ToSalesOrders":{"__deferred":{"uri":":443/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/BusinessPartnerSet('0100000070')/ToSalesOrders"}},"ToContacts":{"__deferred":{"uri":":443/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/BusinessPartnerSet('0100000070')/ToContacts"}},"ToProducts":{"__deferred":{"uri":":443/sap/opu/odata/IWBEP/GWSAMPLE_BASIC/BusinessPartnerSet('0100000070')/ToProducts"}}}}"
I have to read BusinessPartnerID from response Text.Response id in JSON format So what is the standard way to pick any field value it ?
Thanks,
Abhi
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.