Thursday, May 23, 2013

The server was unable to save the form at this time. Please try again.” Error



When working on a SharePoint 2013, after several hours of uptime, the user interface showed an error message when our user wanted to save an item in a list : “The server was unable to save the form at this time. Please try again.”






Looking at different possible causes, We found that the available memory was drastically low. Indeed, on this 8GB RAM, only few megs were still available.





Then, in the “Processes” tab, We saw that the noderunner.exe process was eating a lot of memory. So we restarted the “SharePoint Search Host Controller” service. The service took a long time to restart and a huge part of the memory was released. The good thing is that at the same time it solved the item-saving issue. The error disappeared.

To be sure this service restart was “solving” the issue, We worked again several hours, playing also with the search and when the VM got short in memory, the same error message was shown again.
Another side effect of this low-memory case occurs when browsing the Managed Metadata tree. We suddenly received constantly an “Unexpected response from server. The status code of response is ‘500’. The status text of response is ‘System.ServiceModel.ServiceActivationException’. Unfortunately, it was impossible to get out of this message loop, and the only way to get rid of it was to kill the Internet Explorer application.

To prevent this low-memory case, we upgrade our server RAM into 16GB. So we can keep the available memory high. And we always monitoring our server, so we will release the memory before our clients get the “The server was unable to save the form at this time. Please try again.” error.

Friday, May 17, 2013

Styling the left Navigation bar of Sharepoint site 2013

Add the Following CSS style in your style sheet and change the color and behavior according to your requirement

.ms-core-menu-box, .ms-core-menu-boxBig {
    background-color: white !important;
 
}
.static a{
    color:#153E7E !important;
    font-weight: bold !important;
 /*background-color: #ECECEC !important;*/
}
.static selected a{
    visibility: hidden !important;
}

.menu-item-text span
{
 display:none !important;
}

.ms-webpartPage-root
{
    border-spacing:0px !important;
}

#titleAreaBox
{
    width:100% !important;
margin:0px !important;
height:6px !important;
    background-color:#CCCCCC !important;
    vertical-align:middle !important;

    
}
.ms-breadcrumb-box
{
    height:30px !important;

}

.ms-core-pageTitle{
    display:none !important;

}

.ms-srch-sb-border
{
 background-color:white;
   
}

.ms-srch-sb-borderFocused
{
     background-color:white;
}

.ms-vh2-nofilter
{
color: white !important;
}


 .ms-core-listMenu-root .father
 {
background-color:#035196!important;
}

 .ms-core-listMenu-root li
 {
background-color:#CCCCCC !important;


}

.ms-core-navigation
{
    margin-top:32px;
   
}

.ms-core-listMenu-selected{
     background-color:transparent !important;
}

Monday, May 13, 2013

Geting Error of Condition not found in validating Work follow of Publishing web part

If you r getting error of Condition not found in rules in validating Work follow of Publishing web part.

Solution:
1. get the previous version of Rule file
2. get the previous version of Xoml file.

Then Pu bluish Your Work follow it will work.

Monday, April 29, 2013

Error in converting data conection to UDC


if u got error during converting the Data Connection to Udc file of your conection liabray 
the only solution i found is create new data connection library and save your connection file in it. 


Friday, April 26, 2013

Adding a New verb and give access to specific user on verbs in webpart share point 2010

 add this Code in your web part class in 
 public override WebPartVerbCollection Verbs property and change it according to your Requirement



 using (SPSite spSite = new SPSite("http://abc.com/"))
                using (SPWeb spWeb = spSite.OpenWeb())
                {
                    if (spWeb.CurrentUser.Name == "Customize" || spWeb.CurrentUser.Name == "abc\\Customize")
                    {
                        WebPartVerb configureSettingsVerb = new WebPartVerb("ConfigureSettings", ConfigureSettingsClickEventHandler);
                     

                        configureSettingsVerb.Text = "Configure Settings";
                        configureSettingsVerb.ImageUrl = "../../../_layouts/images/icon-controllerConfiguration.png";
                     
                        WebPartVerbCollection newVerbs = new WebPartVerbCollection(new WebPartVerb[] { configureSettingsVerb });
                        return (new WebPartVerbCollection(base.Verbs, newVerbs));
                    }


                    return (new WebPartVerbCollection(null, null));

Friday, April 19, 2013

Aproving Multiple Items in sharepoint 2013 and updating item in List with the help of Jquery



var web;
var listid;
var listitem = [];
var siteCollection;
var notifyId = '';
var processingCount = 0;
var link;
function Test()
{
MyItems();
}

 function getquerystring(key)
    {

        var qsarr = new Array();
       
        var qs = location.search.substring(1);
        var singleqs = new Array();
        var str ="";
        qsarr = qs.split('&');


        for( i=0; i        {
            singleqs = qsarr[i].split('=');
            if(singleqs[0]==key){
            return singleqs[1];
            }
            }

       return "";
    }

function BulkReceiveAll()
{

var Values= getquerystring('Values');
var WorkFlowURL= getquerystring('WorkFlowURL');
var TaskListID= getquerystring('TaskListID');


 BulkApproveFun(Values,TaskListID) ;

}


function BulkApproveFun(taskid,TaskListID)
{       var tListID=TaskListID;
        var re = /{/g;
       
        var result = tListID.replace(re, "");
        var re2=/}/g;
        var TaskList=result.replace(re2, "");
       

       

    
    var ctx = SP.ClientContext.get_current();
    this.siteCollection = ctx.get_site();
    this.web = ctx.get_web();
   

        
       
        this.listid = TaskList;

        
   ctx.load(this.siteCollection);


var tt =  taskid.split('*');

    for (var i = 0; i < tt.length - 1; i++) {



        this.listitem.push(sdlist.getItemById(tt[i]));
        ctx.load(this.listitem[i]);
    }


    ctx.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));

}






function MyItems()
{  
   
    //notifyId = SP.UI.Notify.addNotification("Processing...", true);

    var ctx = SP.ClientContext.get_current();
    this.siteCollection = ctx.get_site();
    this.web = ctx.get_web();
   

       this.listid = SP.ListOperation.Selection.getSelectedList();
    var sdlist = this.web.get_lists().getById(listid);
    var items = SP.ListOperation.Selection.getSelectedItems(ctx);
    var selectedItems = items; 
    ctx.load(this.siteCollection);
    for (var i = 0; i <= items.length - 1; i++) {
        this.listitem.push(sdlist.getItemById(items[i].id));
        ctx.load(this.listitem[i]);
    }


    ctx.executeQueryAsync(Function.createDelegate(this, this.onQueryS), Function.createDelegate(this, this.onQueryFailed));

}

function onQueryS(sender, args) {
       link ="";
    var workflowlink="";
    var WLink="";
    var tListID="";
    for (var i = 0; i <= this.listitem.length - 1; i++) {

        var workflowlink = this.listitem[i].get_item('WorkflowLink');


        if(link=="")
        link +=this.listitem[i].get_id().toString()+"*";
        else
         link +=this.listitem[i].get_id().toString()+"*";
                 var WlinkIndex=workflowlink.get_url().toString().lastIndexOf("=");
             WLink+=workflowlink.get_url().toString().substr(WlinkIndex+1)+"*";
         //ApproveTasks(this.listid, GetQueryParam("ID", workflowlink.get_url()), this.listitem[i].get_id(), workflowlink.get_url());
           
    }
        //WLink=WLink.substr(0,WLink.lastIndexOf("*")-1);
        tListID=this.listid;
        //window.location.href = "http://10.100.32.13:2014/SitePages/BulkReceiveCases.aspx?Values="+link+"&WorkFlowURL="+WLink+"&TaskListID="+tListID;
        var link="http://10.100.32.13:2014/SitePages/BulkReceiveCases.aspx?Values="+link+"&WorkFlowURL="+WLink+"&TaskListID="+tListID;

        openlinkInDialog(link);
    
}

function openlinkInDialog( pUrl )
 {
 debugger; 
   SP.UI.ModalDialog.showModalDialog(  
     { 
       url: pUrl,
       width: 900, 
       height: 700, 
       title: "Bulk Receive Cases" 
     } 
   ); 
 } 



function ApproveItems()
{

   

    var ctx = SP.ClientContext.get_current();
    this.siteCollection = ctx.get_site();
    this.web = ctx.get_web();

    this.listid = SP.ListOperation.Selection.getSelectedList();
    var sdlist = this.web.get_lists().getById(listid);
    var items = SP.ListOperation.Selection.getSelectedItems(ctx);
    var selectedItems = items;
   
    ctx.load(this.siteCollection);

    for (var i = 0; i <= items.length - 1; i++) {
        this.listitem.push(sdlist.getItemById(items[i].id));
        ctx.load(this.listitem[i]);
    }


    ctx.executeQueryAsync(Function.createDelegate(this, this.onQuerySucceeded), Function.createDelegate(this, this.onQueryFailed));
  
}

function onQuerySucceeded(sender, args) {


    link ="";
    var workflowlink="";
    for (var i = 0; i <= this.listitem.length - 1; i++) {

        var workflowlink = this.listitem[i].get_item('WorkflowLink');


        if(link=="")
        link +=this.listitem[i].get_id().toString()+"*";
        else
         link +=this.listitem[i].get_id().toString()+"*";

          ApproveTasks(this.listid, GetQueryParam("ID", workflowlink.get_url()), this.listitem[i].get_id(), workflowlink.get_url());
           
    }
      
}


function GetQueryParam(key, querystring) {
    var params = querystring.split("?");

    for (var i = 0; i <= params.length - 1; i++) {
        if (params[i].split("=")[0].toLowerCase() == key.toLowerCase())
            return params[i].split("=")[1];
    }

}



function onQueryFailed(sender, args) {
Y =  args;

}




function ApproveTasks(tasklistId, itemId, taskId, item) {
 GetCaseID(taskId);



  
    var soapEnv = " \
                         \
                            \
                            " + item + " \
                            " + taskId + " \
                            " + tasklistId +  " \
                             ReassignedWorkflow web serviceCompleted1maryam.kouser \
                           
\
                       
\
                   
";
                  
    $.ajax({
        url: siteCollection.get_url() + "/_vti_bin/workflow.asmx",
        beforeSend: function(xhr) {
            xhr.setRequestHeader("SOAPAction",
            "http://schemas.microsoft.com/sharepoint/soap/workflow/AlterToDo");
            },
        type: "POST",
        dataType: "xml",
        data: soapEnv,
 
        success: Function.createDelegate(this, this.processResult),
        error:reportError,
        contentType: "text/xml; charset=\"utf-8\""
    });
   

 
}


var processingComplete;
function processResult(xData, status) {

    processingCount++;
    if (processingCount == this.listitem.length) {
        SP.UI.Notify.removeNotification(notifyId);
        notifyId = '';
        SP.UI.Notify.addNotification("Items Approved", false);
location.reload();       
    }

}

function reportError(xData, status) {
    processingCount++;
    SP.UI.Notify.addNotification("Multi Item Approval failed", true);
}

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
var targetListItem;
var CasesListItem;
var CaseID;
var ItemID;
function GetCaseID(item) {

  var ctx = new SP.ClientContext();
  var targetList = ctx.get_web().get_lists().getByTitle('Workflow Tasks');
  targetListItem = targetList.getItemById(item);
  ctx.load(targetListItem, 'CaseID'); 
  ctx.executeQueryAsync(onQuerySu, onQueryFa);
}
function onQuerySu() {

    CaseID=targetListItem.get_item('CaseID');

    UpdateCaseInformation(CaseID);
    //GetCasesItemID(CaseID);
    //BulkUpdate(CaseID);
    //getProducts(CaseID);
     // GetCasesListID(CaseID);
}



/////////////////////////////////////////////////////////////
function UpdateCaseInformation(CaseID)
{
try
{




myListcontext = new SP.ClientContext.get_current();
var web = myListcontext.get_web();
var myList = web.get_lists().getByTitle('Cases');
var camlQuery = new SP.CamlQuery();
camlQuery.set_viewXml(""+CaseID+"");

 this.myListItemCollection = myList.getItems(camlQuery);
 myListcontext.load(myListItemCollection);
/*Because you’re not on the server side you’ll call the executeQueryAsync method that takes two delegates as parameters the first one will be executed when your request is successful and the second if failed.*/
 myListcontext.executeQueryAsync(updateItems);
}
catch(exc)
{

}
}


function updateItems(sender, args)
{
try
{
debugger;

var listItemEnumerator = myListItemCollection.getEnumerator();
$("[id$='_V1_I1_T7']")

var btbOff = $("[id$='customcontrol1_upLevelDiv'] #content").text();

var btbIns=$("[id$='customcontrol0_upLevelDiv'] #content").text();
var Prio=$("[id$='_V1_I1_D4'] option:selected").val();
var status=0;
var user=$("[id$='_V1_I1_T6']").val();
var getbtbOff =  $("[id$='customcontrol1_upLevelDiv'] #content").text().toLowerCase().replace(' ','');
var getuser=  $("[id$='_V1_I1_T6']").val().toLowerCase().split("\\")[1].toString().replace('.','');

if(getbtbOff==getuser){
status =3;
}else{
status=1;
}

while (listItemEnumerator.moveNext())
{

var myListItem = listItemEnumerator.get_current();







myListItem.set_item('Priority', Prio);
myListItem.set_item('Status', status);
myListItem.set_item('BTBInspector', btbIns);
myListItem.set_item('PIN', 123);
myListItem.update();
}
myListcontext.executeQueryAsync(ItemsUpdated, failureMethod);

}
catch(exc)
{

}
}

Info Path

A best articular for

Opening a SharePoint 2010 Modal Dialog Box from an InfoPath Form

 http://msdn.microsoft.com/en-us/library/hh278954%28v=office.14%29.aspx

 

Jquery Panaramoic virtual tour









- In the section, add the panoramic image call, and the object containing interactive areas coords (only ’rect’ type are supported).

Atelier du sculpteur

  vers la salle de formation
  statues
  gouges

How to Build interactive Design in Power Pages

 Need to Create a design in figma/or any UX tool Create a Power pages site. Create new Page Open page in VS Code in every page there are the...