Creation of SP Groups for a site using javascript

Hi,
I need to create four SP Groups for a website.
Here is my code to create a website:
$(document).ready(function () {
createSite();
function createSite() {
var context = SP.ClientContext.get_current();
var collWeb = context.get_web().get_webs();
var strMasterPageUrl = '/_catalogs/masterpage/oslo.master';
var webCreationInfo = new SP.WebCreationInformation();
webCreationInfo.set_title('TestSite27');
webCreationInfo.set_description('Description of new Web site...');
webCreationInfo.set_language(1033);
webCreationInfo.set_webTemplate('STS#0');
webCreationInfo.set_url('TestSite27');
webCreationInfo.set_useSamePermissionsAsParentSite(false);
var oNewWebsite = collWeb.add(webCreationInfo);
oNewWebsite.set_customMasterUrl(strMasterPageUrl);
oNewWebsite.set_masterUrl(strMasterPageUrl);
oNewWebsite.update();
context.load(oNewWebsite);
context.executeQueryAsync(Onsuccess, onfail);
function Onsuccess() {
//Creation of groups
function onfail(sender, args) {
alert('Request failed. ' + args.get_message() + '\n' + args.get_stackTrace());
Here i need to create four groups:
TestOwners
TestMembers
TestVisitors
TestExpert.
The owner of the groups should be TestOwners
Please help.
Thanks,
Sachin

Hi Sachin,
Below link will be helpful to you
http://msdn.microsoft.com/en-us/library/office/hh185014(v=office.14).aspx
Thanks
Somnath Matere

Similar Messages

  • Creation of material Documents for RMPM adjustments using BAPI

    Hi
    can any one help me Creation of material Documents for RMPM adjustments using BAPI...
    i should be grateful to you...
    advance thank you
    with regards
    venkat

    You can check MB_CREATE_GOODS_MOVEMENT which has mkpf as inporting parameter.

  • Why do iPhones/iPad not support Flash Player/Java and what are my alternatives for browsing sites using these plug-ins?

    Why do iPhones/iPad not support Flash Player/Java and what are my alternatives for browsing sites using these plug-ins?

    There are also iSwifter, Photon, Skyfire, etc., some only support Flash some support Java and Flash.
    Adobe never made a version of Flash for iOS and closed their mobile flash division a couple of years ago. You can get Flash on other personal devices but you will be using a 2 year old version that has not been patched for security vulnerabilities.
    When the original iPhone was released Mr. Jobs said it would never run Java as it was old technology and a security risk. Nothing has changed since.

  • Configuring Logon groups for JAVA instances using NWA method

    Hello,
    we have a BI dual System landscape ( CI ABAP+ JAVA plus 2 dialog instance ABAP+JAVA, based on NW04s. I have set up a Web Dispatcher to do a load balancing for JAVA instances. I configured the logon groups according this documentation using NWA (http://help.sap.com/saphelp_nw04/helpdata/en/45/3dbe11a82b6bf1e10000000a1553f6/content.htm).
    The following points are still quite unclear for me:
    1. according documentation I should specify the following profile parameters:
    [Define the special HTTP URLs, which SAP Web Dispatcher uses to send to the AS Java to retrieve the logon groups information]
    wdisp/J2EE/group_info_location = [?] /JavaEE/public/icf_info/icr_groups
    wdisp/J2EE/url_map_location = [?] /JavaEE/public/icf_info/icr_urlprefix
    Wich values should i take here actually? These one or /J2EE/icr_groups and /J2EE/icr_urlprefix ?
    2. Also I have to configure (in visual administrator) the GroupInfoRequest and UrlMapRequest properties of the HTTP Provider service running on server processes. They recommend to use /J2EE/icr_groups and /J2EE/icr_urlprefix. Should it be the same values as defined in those profile parameters?
    3. I have defined the instance IDs and exacte Alias in the groups definitions in nwa. Is it possible to proof somehow while using my URL http://<host>:<port>/TestApp~test/<application_resource> either im web dispatcher (traces?) or on a web site on which DI I actually land to be sure that my load balancing works properly and i don't land on my Central Instance?
    Thanks a lot in advance for your advices.
    best regards,
    Polina

    Understood, Install the web dispatcher and configre the ABAP Message Server Port and ms/http_port (T-CODE:SMMS). Test this link
    http://host:port/sap/public/icf_info/icr_groups
    and this would retrieve the list of ABAP (SMLG) cofigured groups.
    For java load balancing, icm of that host will send the incoming requests to JAVA Dispatcher. The load balancing happens on the basis of server nodes and can be found in the web dispatcher session dispatching table.
    There are no necessary parameters required for java load balancing except the number of server nodes you'll hookup to that dispatcher.
    There is an option called service based, where we configure the j2ee hosts to accept the connections for the services which are running but I haven't seen much customers using this option.
    Bottom line: No changes are required for java side and enable the "ext rfc" option for abap logon groups and rest will be taken care by Web Dispatcher.
    Use connection pooling and high timeouts to acheive the better througput and use the SSL termination on Web Disp.

  • Saved passwords for sites using javascript

    Hello, is there a way to force websites to allow you to use autofill for login info.. i read if the login uses javascript we can't. but there has to be a way.

    Hi, it should work unless you tell the browser not to store the passwords. One way to verify is to go to "about:permissions" (type that into the address bar), then search for the site and make sure "Store Passwords" is set to "Allow".
    Hope this helps!

  • Is there a way to create different groups for my contacts using the installed contact app

    I am trying to make a group on my contacts. So that it's easier to just make messages to people and not having to make group messages every single time. For example, making a group for a sports team so that I can just message everyone in the group at once.

    No not possible but you can create contact groups at www.icloud.com and if you have contact synced thru cloud the groups you make at www.icloud.com will appear on your phone

  • Set annotation flags for link annotations using JavaScript

    The JavaScript for Acrobat API Reference doesn't list Link as an annotation type[1]even if it's a subtype in the PDF specification (8.4.5 Annotation Types).
    I know how to get the link objects using JavaScript, but they don't have a print property, because it belongs to its mother annotation object.
    Example:
    I have a scanned PDF, OCRed, with two links. Acrobat's content panels shows an annotation object with two links.
    >this.syncAnnotScan();
    >var annots = this.getAnnots();
    returns
    >null
    Any idea how to set the annotation flag to Print for a link annotation using JavaScript? (flag 3 aka Print is required for PDF/A)
    [1] http://livedocs.adobe.com/acrobat_sdk/9/Acrobat9_HTMLHelp/JS_API_AcroJS.88.20.html

    Hi,
    Thanks for replying. But this example sets falshvars through the UI, and as I have mentioned I want this done from javascript in the document - I dont have the value for some of the flashvars during embedding.
    (Using a EI call is my last resort, as I am not expected to make any modification to the SWF file - the SWF file, hitherto, was being hosted in a HTML where it was being passed flashvar params)

  • Creation of series group for suncontracting challan

    Hi
    While doing a subcontracting challan using J1IF01 , An error comes series group 101 is not maintained. How can i maintain a series rtoup for subcontracting purpose?
    regards
    B Shar

    Dear B Shar,
    You can maintain your series group 101 in path
    IMG - (Logistics - General) - Tax on Goods Movements - India - Basic Settings - Maintain Series Groups.
    I hope this can answer your problem.
    Regards
    Gunawan

  • Change account group for GR55 report using GS02

    Hi All,
    How do I change the account group at GS03? My account group is PESB_1050 for Facilities Costs and I can display the G/L fot that group using GS03. I need to add new G/L for account group PESB_1050 (for report GR55). I've tried to change from GS02 but the account group is not exist because it not set ID. Kindly advice..
    Thanks in advance

    Hi Eli,
    I've tried to change at GS02, but I got this error mssg 'Set PESB_1050 does not exist'.
    At GS03, I keyed in PESB_1050 at Set ID field and <enter> then I can see the value (GL acnt) inside the PESB_1050. Account group is PESB_1050. Any idea how to change (delete/add GL) the value for that account group?
    Thanks in advance

  • Export InDesign styles for web site use?

    Hi,
    Very often, I have a brochure that's laid out in ID that later needs to be created as a web page. All this time I've been copy/pasting text into Dreamweaver and restyling everything. Is there a way to export the text from an ID file and maintain its styles? Even if I had to tweak or redefine the styles in Dreamweaver, it would save a lot of time styling things indvidually in DW.
    Thanks.
    -Karen

    Which version of ID? CS3 and CS4 both have export options for Dreamweaver under the file menu. CS2 has options to export for GoLive which would probably work as well.
    What you won't get, though, is functioning styles, only a pre-built CSS stylesheet for you to flesh out. It will include all of the styles in the document as CSS style tags.
    Peter

  • Get location/coordinates for a field using JavaScript in Acrobat Professional

    Good day,
    I am looking for a way to get the coordinates of a text field.
    I would like to create a listbox and set the location of the listbox top left to the text fields bottom left coordinates, I have had a look at the scripting guides ... could not turn up anything.
    I know how to create and populate this listbox using the JavaScript code, only problem is, to get the coordinates of the text box.

    Try this:
    1. Move or change the dimensions of the text boxes on the extracted page in the configuration that you want.
    2. When you are satisfied with the new configuration, modify the following JavaScript to use the names of the text boxes that you want to include on the page.
    //find_rect //find coordinates of text boxes whose names are included in the var rct,ary = ["fld_1","fld_2","fld_3","fld_4"]; //...etc.
    for (j = 0; j<ary.length; j++){
    console.println(ary[j]);
    rct = this.getField(ary[j]).rect;
    for (i= 0; i< rct.length; i++) console.println(rct[i]);
    3. Add the modified code to the document level of form. (as a doc level javascript but with no function name or brackets included.
    4. When you run the code, the coordinates for the fields that you have included in the array will be printed in the console window:
    Example:
    fld_1
    21
    777
    296
    717
    fld_2
    30
    769
    65
    729

  • Support for dynamic forms using javascript for android tablet

    I have some complex multipage pdf forms with javascript functions and calculations made in Acrobat X Standard, I can open and use parts of the form in ezyPDF android app, however the javascript is not fully supported, does anyone know of any plug ins or work arounds to view my forms on an android tablet, my forma have to be stand alone as internet access is not always available.
    Regards Mike

    Get to know CF's structure / array notation. This comes in
    very handy when dealing with queries and form fields.
    - Form.myFieldName can also be referenced by
    Form["myFieldName"]
    - MyQuery.myField can also be referenced by
    MyQuery["myField"][rowNumber]
    Anything in the above example surrounded by quotation makes
    can be made dynamic by just adding in a cf variable surrounded by
    pound signs:
    get_dealer_completion["level_#level_id#"][1]

  • Default "Reader" group for new Project Site to include AD group automatically

    I'd like to add "Domain Users" to the readers group for all new Project Sites, as well as the "PMO" AD group to the Owners group for each site automatically as the site is created.
    Is there a way in Project Server 2013 to do that via config?  I'm able to write it programmatically, but don't want to do that if there's an easier way.  We simply don't have time to push that code through right now.
    Thanks,
    Bill Richardson

    I think the only option is to do this programmatically via a custom Project Server event handler. You would probably want it to fire on the Project published events and may the WSS created event.
    Paul
    Paul Mather | Twitter |
    http://pwmather.wordpress.com | CPS

  • VPN tunnels for multiple sites

    Hi, i am building new vpn tunnels for multple sites using 2 ASR 1004, and 100 remote devices cisco 2800 routers.
    I am thinking of using getvpn to do it, am i thinking correct ????? can i use DMVPN ???? what is else there ???
    thanks 

    Is there a need for branch to branch communication?  If so, I would go with the DMVPN option using a single tier, dual DMVPN cloud topology which will allow for spoke to spoke communication.
    Matt

  • CF10 enterprise - how to disable cfexecute for all sites (sandbox)

    Hello,
    I have a new CF10 server which I will be using as shared hosting for my clients.
    I would like to disable the following tags and functions globally:
    TAGS
    CFCONTENT
    CFFILE
    CFDIRECTORY
    CFEXECUTE
    CFOBJECT
    CFREGISTRY
    FUNCTIONS
    GetProfileString
    SetProfileString
    CreateObject
    I know in CF10 Standard I can block these for all sites using 'resource security', this will stop these tags from running at all.
    In CF10 Enterprise I have the option to create multiple sandboxes, but is it possible to create one global sandbox for all sites?
    My directory structure looks like:
    D:\sites\site1
    D:\sites\site2
    D:\sites\site3
    Can I create a sandbox disabling the above tags and functions just for D:\sites and all subfolders?
    I have tried but it does not seem to work - I have a sandbox setup for D:\sites with the above tags and functions disabled, but using a test script I can still use cfexecute in site1 to execute netstat.
    I do not wish to create a sandbox for each site as when new sites are added I would need to manually add a sandbox each time.
    If anyone has any ideas it would be most appreciated.
    Cheers
    Luke
    ( I have asked this in a different place on the CF forums as got no response, i think because I placed it in the wrong place. Sorry if this double post upsets anyone but I need some help!)

    D:\sites\site1
    D:\sites\site2
    D:\sites\site3
    If you define the sandbox to sites folder, then the settings also apply to sub-directories (as the sub directories will inherit the property from parent).
    It is working at my end perfectly fine.
    HTH
    Thanks
    VJ

Maybe you are looking for