cancel
Showing results for 
Search instead for 
Did you mean: 

Building URL to Opportunity with ABSL before save (C4C)

Former Member
0 Kudos

I would like to build an URL leading to an opportunity in C4C.
The URL should be created in the before save event of the opportunity, to post a link to an external service, which opportunity has been modified.
I have already created this code:

Context.GetSystemURL() + "/sap/byd/nav?bo=COD_OPPORTUNITY_THINGTYPE&nav_mode=TI& param.Key=" + this.UUID.content.ToString();

which is generating an URL like this:

https://my######.crm.ondemand.com/sap/byd/nav?bo=COD_OPPORTUNITY_THINGTYPE&nav_mode=TI& param.Key=00163E23E1411EE783AFA3402C2E1410

this URL only works when I am logged in to C4C before using it. When I am not logged in, I get redirected to an SSO page which is defect.
When I modify the URL and add "-sso" the SSO page works. But I would not like to modify the C4C generated URL to make the code work for different tenants.

So my question is:
How can I create a working URL to the opportunity with ABSL?

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member226
Employee
Employee
0 Kudos

Hi,

You can append the User Name and Password in the URL itself and with 2 new parameters "username" and "password". So the new URL will be:

https://myXXXXXX.crm.ondemand.com/sap/public/ap/ui/repository/SAP_BYD_UI/HTML5/newclient.html?sap-ui...;

Please note that this only works in RUI.

Thanks

Saurabh

Former Member
0 Kudos

I would like to post this URL public, so I cant add a user or password.

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Peter,

So you expect the public accessor to have an user and a password?

BTW: The space in the generated URL before "param.Key" is a typo?

Bye,
. Horst

Former Member
0 Kudos

Hello Horst,

It is not really public, it will be posted visible for the company.
When someone uses the link to get to the opportunity he should be able to log in to C4C.
The space is not in the real code, I only added it for this community post, that it will not be converted to a pilcrow.
So I only want to build a URL for the opportunity in the before save event.
Do you know how to do this?

Thanks in advance and best regards,
Peter

former_member192750
Active Contributor
0 Kudos

Horst,

I think it boils down to having an option in the GetSystemURL() to generate the SSO URL instead of the non-SSO URL.

Regards,
Ankan

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Peter,

I just tried your URL with a own system and Firefox (never logged into this tenant with FF before):

=> FF asked me to provide the credentials.

Would this be okay for you?
Did your tried it with Firefox?

Bye,
. Horst

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Ankan,

This would take at least one release to develop and ship. 😞

I am wondering why the SSO redirect is causing an issue. Maybe a malfunctional configuration?

bye,
. Horst

Former Member
0 Kudos

Hello Horst,
I also tried using Firefox, Chrome, Safari, IE / MacOS, Windows, Android, iOS and got the same problem everywhere: I get redirected to the SSO page even if there is no -sso in the URL and then I get a SAML2 Error, but only if there is no -sso in the URL.
Is this a malfunction of C4C or is there a possibility in ABSL to also get the -sso URL if it is available?
Best regard,
Peter

Former Member
0 Kudos

Hello Horst and Ankan,
What could be configurated wrong? The SSO page works but why do I get to a defect SSO page, even if there is no -sso in the URL?
It would be ideal if there is an ABSL-function available for getting the -sso URL and a parameter to see if there is a SSO page.
Best regards,
Peter

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Peter,

I would say, this is mal-configuration of the SAML2 Server.

Can you ask your network guys about this?

Sorry,
. Horst

Former Member
0 Kudos

Hello Horst,
they told me that they double checked everything and there is no mal-configuration. The SSO page works with -sso URL.
Which configuration did you mean exactly?
Regards,
Peter

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Peter,

I will investigate if this (getting the SSO URL) is possible.
But it will not come before 1708, if at all!!!

Bye,
. Horst

HorstSchaude
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hello Peter,

One question to you:

If the tenant does not support SSO should the return value of "Context.GetSystemURL( withSSO )" be empty or should it contain the "normal" URL?

Thanks,
. Horst