cancel
Showing results for 
Search instead for 
Did you mean: 

How can I include third-party javascript libarries in my WebUI app?

former_member211904
Participant
0 Kudos

I would like to include a third-party javascript library, for example MochUI or something similar and combine it with elements in a generated BSP WD application to enhance the user experience.

Is it possible? How would you do this?

Thanks,

Martin

Accepted Solutions (1)

Accepted Solutions (1)

Patrick_McMahon
Contributor
0 Kudos

Hi Martin,

This is possible but be wary of conflicts between your 3rd party library and SAP JS - they use '$' as a function name which libraries such as JQuery also use as a shortcut for their functions. In the case of JQuery, this can be overcome using the noConflict() method.

Patrick.

former_member211904
Participant
0 Kudos

Thanks Patrick. Can you explain how to do this (include a third party library)? Or perhaps point me to some resource like a blog post or thread that explains the process?

Thanks,

martin

Patrick_McMahon
Contributor
0 Kudos

Hi Martin,

You need to enhance the CRM_UI_FRAME BSP component and add a link to the source code of your 3rd party libraries in the WorkAreaViewSet view.

Patrick.

former_member211904
Participant
0 Kudos

Thanks Patrick. However, what if I am building a standalone Web Client app that does not reside in the CRM Web UI framework?

Patrick_McMahon
Contributor
0 Kudos

Hi Martin,

Then just add the link to the 3rd party libraries in your view.

Patrick.

former_member211904
Participant
0 Kudos

Thanks for the help Patrick. It turns out that I will use the application in the CRM Web UI Framework after all.

However, just for testing the application as a standalone one, I tried adding the Javascript reference in the view with calling the noConflict() method. This causes problems though, because there seems to be a lot of SAP's Javascript executing before.

I will try your other solution though.

Former Member
0 Kudos

Hi Martin,

If it is a standalone BSP application - you can just import it into MIME objects of that application and start using it in the htm page of any of the views. (like different calendar JS etc which you want to try on first before importing onto crm_ui_frame).

Thanks,

Rohit

Answers (0)