cancel
Showing results for 
Search instead for 
Did you mean: 

Sample Fiori App - creating a new order shows a popup for the GUID?

SamueleBarzaghi
Participant

Hi,

The sample fiori app at

https://github.com/SAP-samples/cloud-cap-samples/tree/master/fiori

shows a popup that requires the GUID during order creation:

Thank you

Sam

pfefferf
Active Contributor
0 Kudos

What do you want to say us with that "question"?

If you want to report that not user-friendly behavior, probably it is better to open an issue directly for the GitHub repo.

newbie
Explorer
0 Kudos

I have created an issue on the samples github repo. In faced this issue in another application I was developing and then tried the Samples Fiori application. I found that issue in that application too. I suspect it has something to do with the June bug fix related to guid

"UUIDs in OData requests are now normalized by converting them to lowercase."

SamueleBarzaghi
Participant
0 Kudos

Hi,

florian.pfeffer, thank you for your completion, yes I think it's a strange not user-friendly behavior to ask a user for guid, specially when the guid is generated by the framework 😉

I reported here because in github there is:

faltukachra, thank you for the report of the issue in github, I link here your issue for sharing:

https://github.com/SAP-samples/cloud-cap-samples/issues/112

The strange behaviour disapper using the previous sapui5 release 1.76.

Take a look at commit:

https://github.com/sbarzaghialteaup/cloud-cap-samples/commit/b39ba60066c36dd8a88a9af9ef150a7937350cc...

Thank you

Best Regards

Sam

Accepted Solutions (0)

Answers (3)

Answers (3)

SamueleBarzaghi
Participant

The popup seems a new behaviour in sapui5 from 1.79.0, sapui5 fe now during a document creation shows a popup with all the not computed and visible key fields:

(https://sapui5.hana.ondemand.com/1.79.0/resources/sap/fe/core/TransactionHelper-dbg.js?eval line 259).

if (aNonComputedVisibleKeyFields.length > 0) {
        ...
	oCreationPromise = this._launchDialogWithKeyFields(
		oMainListBinding,
		oTransientListBinding,
		oNewDocumentContext,
		aNonComputedVisibleKeyFields,
		oModel,
		mParameters
	);

CDS aspect "cuid" define the field key "ID" without the annotation "@Core.Computed".

I tried to add "@Core.Computed" in @sap\cds\common.cds and the popup disappered.

marcmaurí
Participant
0 Kudos

Hi Samuele,

I added the @Core.Computed annotation to the ID fields in my annotations files and it works like a charm, but I trust that the CAP team will solve it in future releases because adding this annotation for each entity is quite cumbersome and I think that adding it to the @sap\cds\common.cds file isn't the best solution.

Thanks for sharing your solution!

Best regards,

Marc

SamueleBarzaghi
Participant
0 Kudos

Hi marc.mauri,

I agree with you.

I did not understand if writing in this community we reach the CAP team.

Best Regards,

Sam

chgeo
Advisor
Advisor

Thanks for letting us know. We will get in contact with the Fiori team and, if needed, add the Core.Computed annotation.

Ahmedkhan29789
Participant

The easiest way to add the annotation( @Core.Computed) in your cds model in your db folder

Daniel7
Advisor
Advisor
0 Kudos

Sorry, for that ... unfortunately there's nothing we can do from CAP side as a quick fix, as that is beyond our reach.

Maybe best is to pin your ui5/fe version to a last-known-good, e.g. like so in your ./app/index.html for local tests:

<!-- <script src="https://sapui5.hana.ondemand.com/resources/sap-ui-core.js" -->
<script src="https://sapui5.hana.ondemand.com/1.78.6/resources/sap-ui-core.js"

as in https://github.com/SAP-samples/cloud-cap-samples/pull/123

Regards,
Daniel