Office 365 Cascading Columns

I currently have a library using the Document Sets Content Type. I am trying to implement the cascading columns on the NEWDOCSET.aspx. I On SharePoint 2013 and SharePoint 2010 I have managed to get it to work using SPServices and JQuery. I just added a content editor on the edit form and referenced it to a text document that has my JavaScript using SPServices. And made a copy of the NEWDOCSET.aspx located in the Layouts folder on the Server and added my JavaScript on my copied newdocset.aspx. I then referenced it from my libraries document set content type to use my copied newdocset.aspx.

I am having endless difficulty deploying this same solution to Office 365. Is there any way to access the NEWDOCSET.aspx or add a content editor to reference my JavaScript?  

Thank you
ApplePietAsked:
Who is Participating?
 
ApplePietAuthor Commented:
Hi, I have managed to get it to work by adding JavaScript to the MasterPage, this is the only way I have managed to get it to work so far. What will the impact be on Performance and security or is there a better way?

Thank you
0
 
Rainer JeschorCommented:
Hi,
as O365 is a shared environment, a lot of possible customizations are blocked.
Embedding the script into a custom master page is a preferable way, but you have to embed some logic so that your customizations are only executed on the right places / pages.
How does your current JavaScript solution look alike?
You should also keep in mind, that whenever the standard master pages are updated (for new features ...) that you should also create a new customized master page.
Just my 2ct
Rainer
0
 
ApplePietAuthor Commented:
Thanks Rainer for the feedback, I have added some logic to my script and also using a customized masterpage, but here is the logic I used, seems to be working perfectly.

<script [ParentList]]="text/javascript">
  if(document.URL.toLowerCase().indexOf("newdocset") >= 0 || document.URL.toLowerCase().indexOf("editform") >= 0){
      $(document).ready(function() {
            $().SPServices.SPCascadeDropdowns({
                  relationshipList: "[ParentList]",
                  relationshipListParentColumn: "[ParenColumn]",
                  relationshipListChildColumn: "[ChildColumn]",
                  parentColumn: "[ParentColumn1]",
                  childColumn: "[ParentList]",
                  debug: true
            });

      });};
</script>      

<script [ParentList]]="text/javascript">
if(document.URL.toLowerCase().indexOf("newdocset") >= 0 || document.URL.toLowerCase().indexOf("editform") >= 0){
      $(document).ready(function() {
            $().SPServices.SPCascadeDropdowns({
                  relationshipList: "[parentLIst1]",
                  relationshipListParentColumn: "[ParentColumn2]",
                  relationshipListChildColumn: "[ChildColumn]",
                  parentColumn: "MyColumn",
                  childColumn: "MyCHildColumn",
                  debug: true
            });

      });};
</script>

Thanks for the feedback
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
ApplePietAuthor Commented:
Hi, the JavaScript is working as expected, but I have picked up  two issues.

1st Issue: When I make the cascading columns required fields the cascading is not working. It seems it is not reading the JavaScript at all when making the columns a required field.

2nd Issue: When I share the site with external users outside of the organisation, the cascading is also not working.

Have some experienced an issue with this before?

Thank you
0
 
Rainer JeschorCommented:
Hi,
I have (not yet) experienced these kind of issues.
The first issue could be something with the generated HTML source.
The second issue could be missing permissions on the related lists.
KR
Rainer
0
 
ApplePietAuthor Commented:
Hi,

I have resolve the 2nd issue, by giving the users outside the organization permissions on the master pages and layouts library,

the 1st issue I am still having difficulty with. But will see if I can find a solution.

Thank you
0
 
Rainer JeschorCommented:
Hi,
Good to hear.
When you open the page when the fields are required  with IE or Chrome and active dev tools (F12), do you see any script errors?
0
 
ApplePietAuthor Commented:
Hi,

I will investigate the page for script errors and revert with feedback.

Thank again.
0
 
ApplePietAuthor Commented:
I asked the question and still did some thinking, and thought of adding JavaScript to the master page with an if statement
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.