Skip to Content
0

Building URL to Opportunity with ABSL before save (C4C)

Apr 02, 2017 at 04:03 PM

473

avatar image

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?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Saurabh Kabra
Apr 02, 2017 at 06:06 PM
-2

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-language=en&username= &password= >

Please note that this only works in RUI.

Thanks

Saurabh

Show 12 Share
10 |10000 characters needed characters left characters exceeded

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

0

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

0

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

0

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

0

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

0

Hello Peter,

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

Can you ask your network guys about this?

Sorry,
. Horst

0

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

0

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

0

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

0

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

0

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

0

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

0