Thursday, July 18, 2013

Calling a web service in jquery (sharepoint 2013)

function InfoByDate(){
    var divToBeWorkedOn = "#AjaxPlaceHolder";
    var webMethod = "http://abc:8888/Service.asmx/xyz";
    var txt_CNIC =  replaceAll("-","",$("[title='abc']").val());
    var parameters = "{'abc':'"+ txt_abc + "', 'status':'2'}";
   

    $.ajax({
        type: "POST",
        url: webMethod,
        data: parameters,
        contentType: "application/json; charset=utf-8",
        dataType: "json",
        success: function(msg) { 
        if(typeof msg.d[0] !== "undefined") {
        $("[title='Name']").val(msg.d[0]['az']);
        $("[title='xyz']").val(msg.d[0]['ax']); 
        }
        else
        {
         $("[title='Name']").val("");   
          $("[title='xyz']").val(""); 
        }          
        },
        error: function(e){
           $("[title='Name']").val("");              
        }
    });
}

Monday, July 1, 2013

Removing/ Changing Title of Work follow popup form (sharepoint 2013)


 By default work follow form title is the task list title if you want to Change it
replace the following  code with existing "PlaceHolderPageTitle" asp:conetent  in wrktaskIP.aspx
(this file is located in your server)
and if you want to add your custom title add the your tile in text property.

like 

          asp:Content ContentPlaceHolderId="PlaceHolderPageTitle" runat="server"
         SharePoint:EncodedLiteral runat="server" text="" EncodeMethod='HtmlEncode'
asp:Content


now your form header look like this  with out Title.


Thursday, June 27, 2013

Adding/ Starting search service in your share point site (sharepoint 2013)

Easy step of staring search on share point 2013


Step 1
Go to central admin
Step 2
Click on application mangement
Step 3
Click on mange services on server
Step 4
 Start SharePoint Server Search
Step 5
Click on SharePoint Server Search
Step 6
Make search service application
Step 7
Click on search service application
Step 8
Add crawling job
Step 9
Schedule and start crawling job
Step 10
Check the search service health in Search Application Topology
Step 11 
When all are runing fine
test teh search in ur side

Sunday, June 23, 2013

Adding accordion in left navigation in sharepoint 2013


 Add this script in your master page

$(function()
{ if($('#sideNavBox .menu-item.selected').length)
{ $('li.static').removeClass('selected');
 $('#sideNavBox .menu-item.selected').parents('li.static').addClass('selected');
 $('#sideNavBox .menu-item.selected').parents('li.static').last().siblings() .find('> ul').hide(); } 
else $('#sideNavBox .root.static > li.static > ul').hide(); 
$('#sideNavBox .root.static > li.static').each(function()
{ if($(this).find('ul').length){ $(this).addClass('father').click(function()
{ if($(this).children('ul').css('display') != 'none')
{ $(this).removeClass('selected').children('ul').slideUp(); } 
 else { 
$(this).siblings().removeClass('selected').children('ul').slideUp(); 
 $(this).addClass('selected').children('ul').slideDown(); 
 } 
 }); 
}
 });
 });

Thursday, June 20, 2013

How to add Dynmaic image in RDL Report in sharepoint 2013

Step 1..

Create the Virtual Directory for images

Step2..

Add the Image path in DataBase

Step 3..

Add the image path  in Report

Step 4..

Set the Source type of image to Data base.

Step 5..

 Add the Data base Filed to Image

Step 6..

Select the MIME Type

That should by according to you image format like image/jpeg, image/gif


Thursday, June 6, 2013

Adding Work follow Start button in your page (sharepoint 2013)

var itemId=-1; var itemids=-1; var listTitle = ''; $(document).ready(function() { var thisListGuid = '{F01484D1-FC55-4F81-94DE-CF503FEAF322}'; ExecuteOrDelayUntilScriptLoaded( function() { itemId = window.location.search.substring(4); // itemId = $().SPServices.SPGetLastItemId({listTitle : "Material Reuisition Form" listTitle = "Material Form"; var ctx = SP.ClientContext.get_current(); var list = ctx.get_web().get_lists().getByTitle(listTitle); var item = list.getItemById(itemId); ctx.load(item); ctx.executeQueryAsync( function () { itemids = item.get_item('UniqueId'); }, function(sender, args) { alert('Request failed. \nError: ' + args.get_message() + '\nStackTrace: ' + args.get_stackTrace()); }); }, "sp.js"); $("#inputwfllow").click(function () { var lnk= 'http://abc/afd/_layouts/15/IniWrkflIP.aspx?List=' + thisListGuid + '&ID='+ itemId + '&ItemGuid=' + itemids + '&TemplateID={35214bc5-00f3-4aeb-add0-6f648c7c765e}&Source=http%3A%2F%2F10%2E100%2E21%2E32%2FInventoryTracking%2FSitePages%2FMR%5FRequest%2Easpx'; var title = "Ascertain Jurisdiction Report"; window.open(lnk); }); });

Monday, May 27, 2013

How to create Reports in Sharepoint 2013



Step 1:

Create Report library

Step 2:

Add new document of Report Builder Report.








Step 3:

After Creating the report open in Report builder




Step 4:

Make the report and save it in particular library.


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.

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...