Tuesday, 3 September 2019

Microsoft Power Apps & Flow Limitation - August 2019

So, I was working on Power Apps & Flow and facing some weird limitations. So I am witting a blog in case I or any one of you got a client that comes with these limitation, you can provide these reference link and ask them to do raise a ticket with Microsoft.


  1. Power Apps Forms - Attachment Control File upload size limit to 10 MB.

    Though SharePoint allows you to upload 250 MB file per attachment, Power App will only allow you to upload 10 MB file. Recently we got news that the hardcore limit will be increase to 100 MB.  And it will be available by September 2019.

    Reference -  https://powerusers.microsoft.com/t5/PowerApps-Ideas/PowerApps-Attachments-to-SharePoint-lists-size-limit/idc-p/329930/highlight/true#M27163
  2.  Flow time out on Approval action

    Flow provides you OOTB Approval action. You can set timeout period up to 30 days. After that flow will timeout. But when you run the flow it may show you error "your flow time out" if you keep it open to see the stage (after 10 to 15 minutes). But if you go back to list and click on running process again it shows it is running. This is somewhat confusing for end users.

    Reference - https://www.o365dude.com/2018/06/02/timeout-flow-approvals/
  3. Flow Approval action - assigned to change
    If approver is not available, we are not able to delegate approval to someone else. In that case approval will timeout and flow ends. We can use patch mentioned in below link for work around for this now:

    Reference - https://sharepointycl.wordpress.com/2018/05/23/microsoft-flow-approval-with-delegation/
  4. Flow Approval Action - Markdown language - support for outlook client
    The approval action mail body can be only accept makdown language. This is very time consuming in terms of setting up proper formatting if you do not have practice of markdown language. Also the language has many limitation compare to html formatting. And outlook client is not supporting it. 
I will keep on adding bugs that I am facing. Also I will try to add new post if Microsoft release any update on above issues.

Tuesday, 27 August 2019

Implement RenderComplete in React SPFx Webpart

Issue -

One of our Modern SharePoint Project HomePage was taking a long time to load. We raise a ticket to Microsoft for same. To Identify the actual loading time of our web parts, Microsoft asks us to implement RenderComplete function in our custom web parts.


Analysis -

The main issue about the function implementation is it is not documented anywhere in any posts. So it was always trying and error situation. So if you are in the same situation, use below code reference to solve the issue.


Code Solution - To implement the functionality, open your code solution and in your web part, follow the below steps:


  • Open your interface file. add below property to it
    asynccompfunc:() => void;

  • Now open your web part.
  • In your web part ts file, add below code in "render" method.

    public render(): void {
      const element: React.ReactElement<ISubmitNewsProps> = React.createElement(      SubmitNews,
          {
           // other properties...,
            asynccompfunc:this.renderCompleted
          }
        );

        ReactDom.render(element, this.domElement); 
     }
      protected renderCompleted(): void {
        super.renderCompleted();
      }

      protected get isRenderAsync(): boolean {
        return true;
      }


  • Now open your web part tsx file and add below code in "componenetDidMouth" method.

    // Init Function of component mount
      public async componentDidMount() {
        //your code to get data
        this.props.asynccompfunc();
      }

once these changes are applied in your webpats, deploy package. Once your build is deployed, open the page where you have added you web part. Click "Cntr + F12". it will show the performance of your webpart in webpart tab.



Note: This method requires "BaseClientSideWebPart" class to be extended. Application customizer does not extend this class. So we cannot implement this method in Application Customizer.

If you have any questions you can reach out our SharePoint Consulting team here.

Sunday, 30 June 2019

SharePoint Online Allow custom scripts - Part 3

We have looked at why Microsoft disabled custom scripts in SharePoint Online and where it affects. We have looked in previous two blogs why and what is alternative. If you have not gone through that, please check below links.




In this post, we are going to review how to enable custom scripting on site collection level and what will be its impact.

So if we enable scripting at tenant level we may end up loosing control over security. Instead Microsoft Provided a way to enable scripting at site collection level.

Prerequisite:


  • SharePoint Online Management Shell 


Follow below steps to enable scripting at site collection level:

  • Open the SharePoint Online Management Shell console. 
  • Execute the command to connect the Office 365 :

    Connect-SPOService -Url https://tenant-admin.sharepoint.com
  • Execute the command bellow with the url for the site collection where you want to enable scripting:

    Set-SPOSite -Identity https://tenant.sharepoint.com/sites/contoso -DenyAddAndCustomizePages 0


Pros:


  • Tenant level scripting enable may take up to 24 hours. But this approach disable the scripting block immediately. 
  • As this settings are enabled at specific site collection, you can make sure the scripting do not affect other site collections or tenant.

Conclusion:

We have seen limitations and how to overcome that. If you need to enable scripting, choose the settings as per your need.

Saturday, 27 April 2019

SharePoint Online Allow custom scripts - Part 2

We have looked at why Microsoft disabled custom scripts in SharePoint Online and where it affects. If you have not gone through that, please click here to read it.
In this post, we are going to review how to enable custom scripting on tenant level and what will be its impact.

Enable Scripting at the Site Collection Level 

Follow the below steps to “Enable” the custom script at the tenant level:
  • Login into your Office 365 Admin Portal.
    URL - https://admin.microsoft.com
    Click on ellipses in the left side panel.

    Note:  If you have Office 365 Germany, sign in at https://portal.office.de. If you have Office 365 operated by 21Vianet (China), sign in at https://login.partner.microsoftonline.cn/. Then select the Admin tile to open the admin center.
  • Then, it will display all the menu option in the panel. Scroll down and hover on "Admin" center menu and click on "SharePoint" as shown below image.
  • It will open the SharePoint admin page. In the left navigation, select 'Settings'.
  • It will navigate to the settings page. Scroll down till "Custom Script" section. In this select "Allow users to run a custom script on personal sites" & "Allow users to run a custom script on self-service created sites" as shown in below image:
  • Then scroll down to the end of the page and click “OK”. It will take about 24 hours for the changes to take effect.
 
Once these settings are implemented, you will have your classic SharePoint available same as you know. But this also enables the threat that we discussed in the first part. So we would not recommend this approach. 
So what is the alternative? Check out our last post of this topic for same. 

 Reference Link