cancel
Showing results forΒ 
Search instead forΒ 
Did you mean:Β 

Use C4C OData to download , update and insert "Notes" in Visit activity

dhruv_mehta
Active Contributor
0 Kudos

Dear All,

I wanted to move C4C notes to some customfield ( dont ask wh y πŸ˜› )... I thought of using oData but its very complicated to create this.

Below things i am trying.

1. Created CustomOData ( because standard doesnt have Visit notes oData)

2. Made the oData service DWB enabled.

3. Try and fetch data , here i need your help.

Can you please suggest.

Thanks

Dhruvin

Accepted Solutions (1)

Accepted Solutions (1)

dhruv_mehta
Active Contributor
0 Kudos

Hello All,

As Anurag said in comments :

SalesQuoteTextCollection is a Navigation Property and you can only access this collection using the Parent Property and the Object ID of that specific Sales Quote. You cant access it directly.

Also from SAP theres a KBA : https://apps.support.sap.com/sap/support/knowledge/public/en/2523462

Regards, Dhruvin

Answers (1)

Answers (1)

anurag_nath3
Employee
Employee
0 Kudos

Hi Dhruvin,

If you check the $metadata of the service you have created the ID-property will be marked as sap:filterable="false". While creating the custom service you have to select the "filter" check mark for ID. Then that property will be available in Data Workbench filter selecttion

Any which way Export/Update of Notes is not supported in Data Workbench work center.

Regards,
Anurag

dhruv_mehta
Active Contributor
0 Kudos

Hi Anurag,

Thanks for the update but the ID field is always there but te filter checkbox is greyed out 😞 thats the issue!

and also Why I am able to Insert the Visit notes from DWB

but no update and export is there any technical limitation?

Also , How would I can fetch the The Text Collection from any Object via Odata ( not from DWB )?

For example :

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SalesQuoteCollection('00163E6DB29B1ED8AB8AAF91D03B532A')/SalesQuoteTextCollection

Is it possible that I can use standard OData service with out pasing Object ID as UUID but directly ID?

Currently we do like below, to fetch the item level text collection from Quote Header and item.

Step 1 : call the header Odata

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SalesQuoteCollection?$filter=ID eq '1858'&$format=json

Step 2 : call the text collection with the Object ID we getched from above

https://myXXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SalesQuoteCollection('00163E2BC5671EE88CD21512771034B3')/SalesQuoteTextCollection?$format=json

for Item level .

Stpe 1 : Get all Items from Quote

https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SalesQuoteItemCollection?$filter=Quote... eq '1858'&$format=json

Respose :

"SalesQuoteItemTextCollection": { "__deferred": { "uri": "https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SalesQuoteItemCollection('00163E62DDC11ED8AAF06AACFD9F3698')/SalesQuoteItemTextCollection" }

Step 2 : Step 2 : call the text collection with the Object ID we getched from above in loop for each item

https://myXXXXX.crm.ondemand.com/sap/c4c/odata/v1/c4codataapi/SalesQuoteItemCollection('00163E62DDC11ED8AAF06AACFD9F3698')/SalesQuoteItemTextCollection

Which yield us the Texts from the Sales Quote, Can I reduce the step , like I can use SalesQuoteItemText

just by passing quote id as a filter?

Regards, Dhruvin

anurag_nath3
Employee
Employee

Hi Dhruvin,

As mentioned earlier Export and Update of Notes of any object is not possible using Data Workbench work center. That is the reason you cant see the ID in Export view

SalesQuoteTextCollection is a Navigation Property and you can only access this collection using the Parent Property and the Object ID of that specific Sales Quote. You cant access it directly

Regards,
Anurag Nath

dhruv_mehta
Active Contributor
0 Kudos

Hi Anurag,

yes you are right 😞 i also found below KBA.

https://apps.support.sap.com/sap/support/knowledge/public/en/2523462

Direct entity set read of TextCollection/Notes and Attachments is not supported.

Attachments and Notes are attached to an object (Master/Transactional) and should be read with reference to that object via navigation


Anyways thanks for the support πŸ™‚

Regards, Dhruvin