Tuesday, May 9, 2017

Change URL of HTML page without refreshing the page - Javascript

If you would like to replace a URL without page refresh.
I need to change:

https://example.com/en/SitePages/Projects.aspx
to

https://example.com/en/SitePages/ProjectsProduction.aspx

Use 'history.pushState' like this:

history.pushState(null, null, '/en/SitePages/ProjectsProduction.aspx');

Click default "Browse" tab of ribbon on New/Edit forms to reset the ribbon instead of Edit tab - SharePoint

Write the following code in your window.onload() :- 

--------------------------------------------------------------------------------------
function ResetRibbon() {
            try {
                var ribbon = SP.Ribbon.PageManager.get_instance().get_ribbon();
                SelectRibbonTab("Ribbon.Read"true);
                ribbon.removeChild("Ribbon.ListForm.Display");
                ribbon.removeChild("Ribbon.ListForm.Edit");
            } catch (e)
            { }
        }

        SP.SOD.executeOrDelayUntilScriptLoaded(function () {
            try {
                var pm = SP.Ribbon.PageManager.get_instance();

                pm.add_ribbonInited(function () {
                    ResetRibbon();
                });

                var ribbon = null;
                try {
                    ribbon = pm.get_ribbon();
                }
                catch (e) { }

                if (!ribbon) {
                    if (typeof (_ribbonStartInit) == "function")
                        _ribbonStartInit(_ribbon.initialTabId, falsenull);
                }
                else {
                    ResetRibbon();
                }
            } catch (e)
            { }

        }, "sp.ribbon.js");

Quick Hacks - Access Urls of Nintex Workflows

See All Nintext workflows along with versions  :- 

YourSiteUrl/Lists/NintexWorkflowHistory/AllItems.aspx


See All Nintext workflows history list :-

YourSiteUrl/NintexWorkflows/Forms/AllItems.aspx 

"Sharepoint Error: Save Conflict Your changes conflict with those made concurrently by another user" - What it actually means??

Save Conflict
Your changes conflict with those made concurrently by another user. If you want your changes to be applied, click Back in your Web browser, refresh the page, and resubmit your changes.
This happens whenever you try to save a SPListItem which has been modified since you opened it. So, it's mandatory to refresh the page for fetching the latest saved data and then edit it. Review your code to ensure that you don’t open the same list item multiple times, work with a single SPListItem object instead.
You can think of it in the same way as you use say :-
TFS server and you are trying to save some item you have opened which is not the latest version and thus you will be popped up witha message saying, "This is not the latest version of the file you are editing, Get the latest version of the file before editing."

Clearing Person/Group Values

To clear out or empty the values in person or group columns, how you do it depends on if the column is single-value or multi-value. For ...