User Authorization on Customize Forms(User Forms)

Hi Experts,
                        I want to implement authorization on Customize forms by code... i am using .NET Framework with C# for development.... please guides me...
thanks
deepak

Dear Deepak Gaur,
Here the sample code from SDK help:
Adding a PermissionTree - parent object (Visual Basic)
[Visual Basic]
Dim RetVal As Long
Dim ErrCode As Long
Dim ErrMsg As String
Dim mUserPermission As SAPbobsCOM.UserPermissionTree
Set mUserPermission = oCompany.GetBusinessObject(oUserPermissionTree)
'//Mandatory field, which is the key of the object.
'//The partner namespace must be included as a prefix followed by _
mUserPermission.PermissionId = "SM_MathClass"
'//The Name value that will be displayed in the General Authorization Tree
mUserPermission.Name = "SM_MathClass"
'//The permission that this object can get
mUserPermission.Options = bou_FullReadNone
'//In case the level is one, there Is no need to set the FatherID parameter.
mUserPermission.Levels = 1
RetVal = UserPermission.Add
oCompany.GetLastError RetVal, ErrMsg
'//In case this permission object has a son permission object
Adding a PermissionTree - child object (Visual Basic)
[Visual Basic]
Dim RetVal As Long
Dim ErrCode As Long
Dim ErrMsg As String
Dim mUserPermission As SAPbobsCOM.UserPermissionTree
Set mUserPermission = oCompany.GetBusinessObject(oUserPermissionTree)
mUserPermission.PermissionId = "SM_MathClassSon"
mUserPermission.Name = "SM_MathClassExam"
mUserPermission.Options = bou_FullNone
'//For level 2 and up you must set the object's father unique ID
mUserPermission.Levels = 2
mUserPermission.FatherID = "SM_MathClass"
'//this object manages forms
mUserPermission.UserPermissionForm.FormType = "GL_MathClass"
RetVal = mUserPermission.Add
oCompany.GetLastError RetVal, ErrMsg
[Visual Basic]
Dim RetVal As Long
Dim ErrCode As Long
Dim ErrMsg As String
Dim mUser As SAPbobsCOM.Users
Set mUser = oCompany.GetBusinessObject(oUsers)
'//The user unique ID is 2
RetVal = mUser.GetByKey(2)
'//Setting a new sub object for the User that hold the user permission for the user permission object
mUser.UserPermission.PermissionId = "SM_MathClassSon"
'//Seting full permission for User 2 to manage SM_MathClassSon sub object
mUsers.UserPermission.Permission = boper_Full
RetVal = mUsers.Update
oCompany.GetLastError RetVal, ErrMsg
Setting user permission (Visual Basic) Copy Code
Dim RetVal As Long
Dim ErrCode As Long
Dim ErrMsg As String
Dim mUser As SAPbobsCOM.Users
Set mUser = oCompany.GetBusinessObject(oUsers)
'//The user unique ID is 2
RetVal = mUser.GetByKey(2)
'//Setting a new sub object for the User that hold the user permission for the user permission object
mUser.UserPermission.PermissionId = "SM_MathClassSon"
'//Seting full permission for User 2 to manage SM_MathClassSon sub object
mUsers.UserPermission.Permission = boper_Full
RetVal = mUsers.Update
oCompany.GetLastError RetVal, ErrMsg
Best Regards
Jane Jing
SAP Business One Forums team

Similar Messages

  • Prevent multiple users from editing/approving the same form SPD 2013,SP 2013

    Hello all, I have a workflow with a to do task, the task is assigned to a group so any of the users in that group can go in and do a quality check on form data and approve it.  How do I prevent multiple users from working on the
    same form? do I just require check out? or is there a way to notify the rest of the group that a user has already started the quality check.

    The "Require Checkout" option is your best bet.  You can also enable the auto checkout on edit option to allow minimal effort on the side of the user.  Other users will then get the error message stating the item is checked out, if they try to
    edit it.
    If you'd like, you could add a workflow to the task list that triggers when something is changed.  That workflow can check if the item is checked out and if so, email the other users assigned to the task.
    I trust that answers your question...
    Thanks
    C
    |
    RSS |
    http://crayveon.com/blog |
    SharePoint Scripts | Twitter |
    Google+ | LinkedIn |
    Facebook | Quix Utilities for SharePoint

  • How do I migrate from a former user account on an external drive after a clean install?

    This question has been partially answered before but not to my satisfaction and, from what I've found, not for Mountain Lion.
    My MBPr was running fine for a week after I transfered my User account to an external drive. After some reorganization I decided to move the acount to a different external drive. I blundered and, for whatever reason, was unable to log in to any account on my MBPr. Not even my backup account - which suprised me. (I tried repairing disks, permissions, etc...) I tried to resolve it on the phone with Apple to no avail. Finally, I gave up. I booted into recovery and did a reinstall. After 12 hours I came back to find that it wasn't a clean reinstall. And I still couldn't log in to anything. 
    I then did an erase and reinstall. After another 12 hours I now have a clean install of Mountain Lion on my MBPr. I have an external drive with my former working user directory (Home:Users/mrmoose) on it. (BTW, It is LARGER than my internal SSD drive, it is not bootable, AND I have no backup of it in Time Machine format.)
    My current user account is Macintosh HD:Users/bullwinkle
    1) Is there a way to "reclaim" my user account on the external drive - possibly without even copying or migrating?
    2) Can I copy the contents of bullwinkle (excluding some of my folders under Documents so it fits) to Macintosh HD Users/bullwinkle? Including the Library folder? I have audio plugins, etc...
    I'd still like my User directory on an external drive. But I will settle for keeping it on the internal drive. I just want my info back.
    Why, oh, why does Migration Assistant require your data to be in TIME MACHINE format only - why can one not migrate from a full copy on an external drive? Why can't it look at the darn thing and say, "Hey, that's a copy of an OSX User directory. I can migrate data from that."?
    I would greatly appreciate a detailed response. THANK YOU. Lama Out.

    ~/Library is probably the one you don't want to move back because it may bring the issues back along with it.
    All your own data you can drag & drop. You can drag the contents of any folder Movies, Music, Pictures, Documents (or as much as you want).
    Rather than try to replace the Library you can take ~/Library/Application Support, Mail, Safari and any other folders you need.
    To access your hidden ~/Library folder go to your Finder "Go" menu hold the option key to choose "Library".
    Then you can drag it to the Sidebar for easy access.

  • I am a former user of Adobe Photoshop CS3 as a very beginner.  I wish to know if Creative Cloud will do everything that Photoshop CS3 did for me.  I am very confused with all these new products.  Can you help me?

    I am a former user of Adobe Photoshop CS3 as a very beginner.  I have had no training.  I wish to know if the new Creative Cloud will do everything that my Photoshop CS3 did for me.  Can you help me?

    Please refer to:
    Photoshop Help | Photoshop CC / Common Questions
    https://helpx.adobe.com/lightroom/faq.html
    Photoshop CC is much enhanced than CS3 & you would love the new features too.
    Regards
    Rajshree

  • Is there a way for a form user to load graphics and text in same field?

    I am aware that you can load text into a text field and graphics into an image field.  However, I would like to load a document containing text and graphics (e.g., MS Word or RTF) into a single field on a PDF form.  Is there any way to do this?

    Paul,
    I believe that the example of attaching a file that you have provided will solve the problem.  I am using LiveCycle Designer, so using the code that is in your example should be no problem.  The end-user will use Adobe Reader, so as you mentioned, I will use Acrobat to extend the features so that the form can be used by Reader.
    Thanks so much for your help,
    Daniel
    From: pguerett <[email protected]>
    To: Daniel Beinart <[email protected]>
    Sent: Monday, April 25, 2011 3:03 PM
    Subject: Re: Is there a way for a form user to load graphics and text in same field?
    It is part of the PDF AcroForm side of things .....Are you using Reader or Acrobat to fill the form. If Reader then you will have to Reader Extend to make this work ....if Acrobat then you simply need to add some code. I have attached a sample that shows you how to do it if you want it.
    Paul

  • How to find users machine / IP who is accessing forms through Oracle AS

    Dear Gurus
    We need to know the users machine / IP who are accessing forms through Oracle 9i Application Server, how can we find that?
    thanks in advance
    regards
    Mehmood

    Mehmood,
    Set serverURL=/forms90/f90servlet/session in the Forms Web configuration default section or add it to the URL to start tracing host name and ip-addresses from clients. The output appears in the servlet log file application.log. sessionperf , perf and debug are the other options instead of session.
    regards,
    Bernhard Jongejan
    http://bernhardjongejan.spaces.live.com

  • The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppres

    I am looking at an issue with users not getting specific group policies. 
    After searching a number of client computers I found that the following error
    The user '*' preference item in the 'User - 6th Form Students Policy {E03166E7-A848-48B5-AA93-97B848AA9C13}' Group Policy object did not apply because it failed with error code '0x80070003 The system cannot find the path specified.' This error was suppressed.
    I can find the folder in the Sysvol folder on all of the domain controllers. 
    The issue with end users seems to be that the proxy settings for internet explorer is not being applied. 
    Potential problems?
    one folder in sysvol entry is empty 
    \\<server>\SYSVOL\<domain.name>\Policies\{E03166E7-A848-48B5-AA93-97B848AA9C13}\User\microsoft\IEAK\LOCK
    or is this our issue
    The old method of configuring proxy settings  to Internet Explorer 9 has changed?
    https://support2.microsoft.com/kb/2530309?wa=wsignin1.0 
    http://thommck.wordpress.com/2013/11/08/the-new-way-to-configure-internet-explorer-proxy-settings-with-group-policy/

    Hi all 
    In administering this policy I am a little confused. 
    We have a policy that distributes proxy settings in the internet explorer maintenance settings section - however when opening this policy up in GPO editor the internet explorer maintenance section is not present.
    I plan to apply the settings via User/preferences/control panel settings/ internet settings (or registry settings from article) however I am unable to edit the settings for internet explorer maintenance and these will persist. Ideas????

  • User should only work on created Form

    Hi all!
    Here is my problem.
    A user is working in B1. For example:With a double_klick on a Textfield and a user created Form will be shown.
    No the User should only work with this Form until its closed! There should be no possibility to open an other form or so.
    Like if you get a MessageBox, there is no other "normal" way to work on until you close this Messagebox.
    May it is possible to let the Form act like such a Messagebox.
    Thanks for replies..
    Matthias

    The Sample you speak of show the hack/workaround (Not true modal functionality).
    From the sample:
        Private Sub SBO_Application_ItemEvent(ByVal FormUID As String, ByRef pVal As SAPbouiCOM.ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
            ' Don't let the user to move to other forms
            Dim EventEnum As SAPbouiCOM.BoEventTypes
            EventEnum = pVal.EventType
            If bModal And FormUID <> "Modal" Then
                oForm.Select() ' Select the modal form
                BubbleEvent = False
            End If
            ' If the modal from is closed...
            If FormUID = "Modal" And (EventEnum = SAPbouiCOM.BoEventTypes.et_FORM_CLOSE) And bModal Then
                bModal = False
            End If
        End Sub
    In the sample the bModal bool set to true when opening the form block all events by selecting the modal form on each event and setting bubbleevent to false.. the EventEnum = SAPbouiCOM.BoEventTypes.et_FORM_CLOSE set the bModal to false so events can continue
    Biggest problem with this is if you use a eventfilter (which you should do)... here you need to remove the event filter along with setting the BModal (not in the sample), and reapply it after form close.
    <i>Kind Regards
    Rasmus Wulff Jensen | http://www.b1up.net</i>

  • Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Form fields in LiveCycle. I want to allow users to add URLs to a form so that they can be clicked and opened on the web by form reviewers (users). what is the best way to achieve this?

    Once the user has entered the URL they want to add to the form. You can use the loadXML function to implement some special text in a label...
    var linkValue = "<?xml version=\"1.0\" encoding=\"UTF-8\"?><exData contentType=\"text/html\" xmlns=\"http://www.xfa.org/schema/xfa-template/2.8/\"><body xmlns=\"http://www.w3.org/1999/xhtml\" xmlns:xfa=\"http://www.xfa.org/schema/xfa-data/1.0/\" xfa:APIVersion=\"Acroform:2.7.0.0\" xfa:spec=\"2.1\"><p style=\"font-weight:bold;text-decoration:none;letter-spacing:0in\">The new link the user have entered is:<a href=\"" + textfield.rawValue + "\">textfield.rawValue</a></p></body></exData>";
      this.resolveNode("lblURL").value.exData.loadXML(linkValue, 1, 1);

  • Set "peoples or groups" field with current user "login name" in sharepoint list form using javascript

    hi friends
    i am trying to set peoples or groups field in sharepoint  list form with current user login name
    here my code
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    $(document).ready(function NewItemView () {
    var currentUser;
        if (SP.ClientContext != null) {
          SP.SOD.executeOrDelayUntilScriptLoaded(getCurrentUser, 'SP.js');
        else {
          SP.SOD.executeFunc('sp.js', null, getCurrentUser);
        function getCurrentUser() {
          var context = new SP.ClientContext.get_current();
          var web = context.get_web();
          currentUser = web.get_currentUser();
          context.load(currentUser);
          context.executeQueryAsync(onSuccessMethod, onRequestFail);
        function onSuccessMethod(sender, args) {
          var account = currentUser.get_loginName();
          var accountEmail = currentUser.get_email();
          var currentUserAccount = account.substring(account.indexOf("|") + 1);
        SetAndResolvePeoplePicker("requester",account);
    // This function runs if the executeQueryAsync call fails.
        function onRequestFail(sender, args) {
          alert('request failed' + args.get_message() + '\n' + args.get_stackTrace());
     function SetAndResolvePeoplePicker(fieldName, userAccountName) {
       var controlName = fieldName;
        var peoplePickerDiv = $("[id$='ClientPeoplePicker'][title='" + controlName + "']");
        var peoplePickerEditor = peoplePickerDiv.find("[title='" + controlName + "']");
        var spPeoplePicker = SPClientPeoplePicker.SPClientPeoplePickerDict[peoplePickerDiv[0].id];
        peoplePickerEditor.val(userAccountName);
        spPeoplePicker.AddUnresolvedUserFromEditor(true);
    </script>
    but it is not working
    please help me

    Hi,
    According to your post, my understanding is that you wanted to set "peoples or groups" field with current user "login name" in SharePoint list form using JavaScript.
    To set "peoples or groups" field with current user "login name”,  you can use the below code:
    <script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.9.0.js"></script>
    <script type="text/javascript">
    function SetPickerValue(pickerid, key, dispval) {
    var xml = '<Entities Append="False" Error="" Separator=";" MaxHeight="3">';
    xml = xml + PreparePickerEntityXml(key, dispval);
    xml = xml + '</Entities>';
    EntityEditorCallback(xml, pickerid, true);
    function PreparePickerEntityXml(key, dispval) {
    return '<Entity Key="' + key + '" DisplayText="' + dispval + '" IsResolved="True" Description="' + key + '"><MultipleMatches /></Entity>';
    function GetCurrentUserAndInsertIntoUserField() {
    var context = new SP.ClientContext.get_current();
    var web = context.get_web();
    this._currentUser = web.get_currentUser();
    context.load(this._currentUser);
    context.executeQueryAsync(Function.createDelegate(this, this.onSuccess),
    Function.createDelegate(this, this.onFailure));
    function onSuccess(sender, args) {
    SetPickerValue('ctl00_m_g_99f3303a_dffa_4436_8bfa_3511d9ffddc0_ctl00_ctl05_ctl01_ctl00_ctl00_ctl04_ctl00_ctl00_UserField', this._currentUser.get_loginName(),
    this._currentUser.get_title());
    function onFaiure(sender, args) {
    alert(args.get_message() + ' ' + args.get_stackTrace());
    ExecuteOrDelayUntilScriptLoaded(GetCurrentUserAndInsertIntoUserField, "sp.js");
    </script>
    More information:
    http://alexeybbb.blogspot.com/2012/10/sharepoint-set-peoplepicker-via-js.html
    Best Regards,
    Linda Li
    Linda Li
    TechNet Community Support

  • Print Forms Central form by user?

    I created an online form using Forms Central. I would like to have my users be able to print their form out for their records but it seems there is no way to do this using Forms Central. Seems like there should be a "Print Form" button that could be placed near the submit button. Am I missing something?
    Thanks in advance for you help.

    Hi,
    Anyone from Oracle Forms Team to answer this?
    Regards,
    Ricardo

  • Can I use Visual Basic to covert form user data from multiple .pdf files to a single .csv file?

    Can I use Visual Basic to covert form user data from multiple .pdf files to a single .csv file?  If so, how?

    You can automate Acrobat using IAC (InterApplication Communications), as documented in the Acrobat SDK. Your program could loop through a collection of PDFs, load them in Acrobat, extract the form data from each, and generate a CSV file that contains the data.
    Acrobat can also do this with its "Merge Data Files into Spreadsheet" function, but this is a manual process.

  • Can users add an attachment & save the form?

    I am attempting to create a form that users can download, fill out & submit with an attachment. It appears that the only way to add an attachment is the use an online (web form). But I don't see how users can save the online (web form) prior to submitting it.
    Is there a workaround that will accomplish adding an attachment & saving the form?

    Basically you are correct. Web forms currently have no way of locally saving them prior to submission. You could turn on email notifications found in the options tab to allow the user to see the data they entered.
    Andrew Yarborough

  • How to send a user defined parameter to a web form?

    Hi,
    I4m looking for a solution how to send a user defined parameter to a web form when I start the form from a html-page.
    I think that it should work to add the parameter to the URL.
    Example: I added myparam=myvalue at the end oft the URL
    http://my.server.com:7777/f60cgi?form=myform.fmx&userid=scott/tiger@mydb&otherparams=useSDI=NO&lookAndFeel=generic&colorScheme=teal&myparam=myvalue
    How can I fetch the parameter myparam in forms?

    You have the user the otherParams parameter, which you can specify in the formsweb.cfg file, or override on the url. e.g. http://myhost/servlet/f690servlet?config=myApp&otherParams=myParam=myValue
    In the Forms Builder, in the Navigator window, there is a node called Parameters. Create one in there, and then you can refer to it like a block variable. e.g. if :myparam = 'myvalue' then...
    At runtime, Forms will match up any parameters on the command with parameters defined in your form, and populate them for you. You don't have to do anything.
    Regards,
    Robin Zimmermann
    Forms Product Management

  • OIM: Lookup/Search for OIM user to include in a process form.

    running OIM 11.1.1.5
    I have a form for a custom provisioning target. One of the form fields (UD_RESOURCE_RESPONSIBLEUSER) is to be defined as a lookup query and I need to have the lookup query search users to assign to this field.
    Can anyone point me to a sample lookup query that can be used to populate a query box, similar to the "MANAGER" attribute is populated in OIM? What if I wanted to have a multi-valued attribute (i.e.: have more than one responsible user? )
    Thanks in advance

    Refer:
    User list lookup
    or
    Lookup Query
    And for multiple values, make UD_RESOURCE_RESPONSIBLEUSER a child table

Maybe you are looking for