Summary of Sharepoint2013app development problems

Source: Internet
Author: User

First, the question: ' Notifyscriptloadedandexecutewaitingjobs ' is undefined

Description: Invoking the Search service using the JavaScript object model throws an exception at run Sp.search.js: 0x800a1391-javascript run-time error: ' Notifyscriptloadedandexecutewaitingjobs ' not defined

Workaround: Introduce init.js <script type="text/javascript" src in the page ="/_layouts/15/init.js"></script>

Notifyscriptloadedandexecutewaitingjobs is defined in the Init.js, and the Sp.sod method is also, if "SP" appears. Sod undefined "This error, also introduced init.js can be

Second, question: Add Custom CustomAction, click on how to eject the modal form

<customaction id= "E5535f8e-b06c-4cd4-bcb2-ae51ae1fa2ec. Fixdocrca "
Registrationtype= "List"
Registrationid= "101"
location= "Commandui.ribbon"
Sequence= "10001"
title= "Custom Button"

<!--means open in a new form

hostwebdialog= "TRUE"
hostwebdialogheight= "420"
hostwebdialogwidth= "510" >

<CommandUIExtension>

<CommandUIDefinitions>
<commanduidefinition location= "Ribbon.documents.manage.controls._children" >
<button id= "Ribbon.Domuments.Manage.FixDocRCAButton"
alt= "Custom Button"
Sequence= "100"
Command= "Invoke_fixdocrcabuttonrequest"
labeltext= "Custom Button"
Templatealias= "O1"
Image32by32= "_layouts/15/images/placeholder32x32.png"
image16by16= "_layouts/15/images/placeholder16x16.png"/>
</CommandUIDefinition>
</CommandUIDefinitions>
<CommandUIHandlers>
<commanduihandler command= "Invoke_fixdocrcabuttonrequest"

<!--jump to post.aspx, JavaScript is not supported in SharePoint2013 commandaction
commandaction= "~appweburl/pages/post.aspx? {standardtokens}&amp; splistitemid={itemid}&amp; Splistid={listid}} "

<!--A document record the button is selected to be enabled - Enabledscript= "JAVASCRIPT:SP. ListOperation.Selection.getSelectedItems (). length = = 1 "

/>

</CommandUIHandlers>
</commanduiextension >
</CustomAction>

In addition, in the jump page post.aspx Placeholderadditionalpagehead should also be introduced

<webpartpages:allowframing id= "AllowFraming1" runat= "Server"/>

Indicates that the page is allowed to be displayed as a frame

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.