Scripting error changing field required state

I need to update all fields in a document to be not required. I read the value but cannot set it. I get the following error in the debugger.
NotAllowedError: Security settings prevent access to this property or method.
Field.required:10:click undefined:Exec
According to the documentation, this should be easy to do.
required
Sets or gets the required characteristic of a field. When true, the fields value must be nonnull when the user clicks a submit button that causes the value of the field to be posted. If the field value is null, the user receives a warning message and the submit does not
occur.
Type: Boolean Access: R/W Fields: all except button.
Example
Make "myField" into a required field.
var f = this.getField("myField");
f.required = true;
I am not sure what this means or how to correct. Any help would be greatly appreciated. My code is below.
var fieldCount = event.target.numFields;
for ( var i = 0; i < fieldCount; i++)
var fieldName = event.target.getNthFieldName(i);
app.alert(fieldName);
var field = event.target.getField(fieldName);
if(field.type != "button" &&
field.type != "checkbox")
app.alert(field.required);
field.required = false;

If you are designing your form in Designer and not Acrobat then you shouldn't be trying to change the property on the AcroForm object (ie: the fields you get from using event.target.getField()) but rather on the XFA object. Here is an example copied from the XML Form Object Model Reference that changes all fields to read only. You can modify this to achieve what you want. In your case you'll want to set the mandatory property to "disabled".
// Get the field containers from each page.
for (var i = 0; i < xfa.host.numPages; i++) {
var oFields = xfa.layout.pageContent(i, "field");
var nodesLength = oFields.length;
// Set the access type.
for (var j = 0; j < nodesLength; j++) {
var oItem = oFields.item(j);
if (oItem != this) {
oItem.access = "readOnly";
Chris
Adobe Enterprise Developer Support

Similar Messages

  • ITS iView not loading ; script Error

    Hi All,
                We have an ITS iView which when executed opens in a new Window.
    Everything has been working fine till last week . Now we have a problem after upgrade to ECC 6.0 wherein the iView doesn't load in the new Window and throws a Script Error:<b> Object required</b>. . But at  the same time, if we press "ENTER"  key in the Address bar of the newly opened Internet Explorer Window, it loads fine. This does sound strange, though
    Warm Regards,
    Roopesh

    Hello Roopesh,
    that sounds more of an issue in EP than of the ITS. Can you determine the root of that issue? Mostly a missing or outdated script can cause such an error message.
    Regards,
      TJ

  • Error: The following required field is missing from the launch file: jnlp

    PLEASE help me.
    I was at Starbuck's today trying to install new software for my new wireless internet card and when I finished I could no longer access any of my applications that require java... I have a macbook pro dual platform computer. When I try to access www.bayphoto.com to download my application it says: (see below) (which I think is strange because it's all about Starbuck's and it should be my java code- I think...). Like I said - I have no idea what's going on or how to fix this. Please help me or at least tell me whom to call- I feel so stupid- I just need help- ATT? Starbuck's? Sun?
    Error: The following required field is missing from the launch file: <jnlp>
    Under the "exceptions" tab it says:
    MissingFieldException[ The following required field is missing from the launch file: <jnlp>]
         at com.sun.javaws.jnl.XMLFormat.parse(XMLFormat.java:88)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:52)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:64)
         at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(LaunchDescFactory.java:72)
         at com.sun.javaws.Launcher.updateFinalLaunchDesc(Launcher.java:214)
         at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:127)
         at com.sun.javaws.Launcher.launch(Launcher.java:95)
         at com.sun.javaws.Main.launchApp(Main.java:305)
         at com.sun.javaws.Main.continueInSecureThread(Main.java:213)
         at com.sun.javaws.Main$1.run(Main.java:108)
         at java.lang.Thread.run(Thread.java:613)
    Under the "launch file tab" it says:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
    <title>AT&T Wi-Fi Service @ Starbucks</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta name="description" content="Starbucks Entertainment presented by AT&T Hotspot" />
    <meta name="keywords" content="AT&T, Starbucks, Wi-fi, Wifi, Hotspot, coffee, music, books, games, fresh sheet, third place, online" />
    <meta name="author" content="Starbucks Entertainment" />
    <link rel="shortcut icon" type="image/ico" href="/favicon.ico" />
    <script type="text/javascript" language="javascript" src="/dhtml/master.js"></script>
    <script type="text/javascript" language="javascript" src="/dhtml/x_core.js"></script>
    <script type="text/javascript" language="javascript" src="/dhtml/x_event.js"></script>
    <script type="text/javascript" language="javascript" src="/dhtml/x_xhr.js"></script>
    <script type="text/javascript" src="/dhtml/att/dhtml.js"></script>
    <style type="text/css">
    copied from starbucks master.css
    body {
         background:#200D06 url("/graphics/att/themes/sbux/hotspot_bkgd.jpg") repeat-x scroll;
         color:#555555;
         font-family:Arial,Helvetica,sans-serif;
         font-size:small;
         line-height:1.5em;
         margin:0pt;
         padding:0pt;
         text-align:center;
    #wrap {
         font-size:95%;
         margin:0pt auto;
         text-align:left;
         width:980px;
    #starbucksframe {
         margin:15px 0pt 0pt;
         padding:0pt;
    /*our addendae*/
    div#header {
         height:95px;
         width:980px;
         background-image:url("/graphics/att/themes/sbux/header_bg.jpg");
         background-repeat:no-repeat;
         margin:0px;
         background-top:0px;
         background-left:0px;
         background-color:transparent;
    div#btn_ctti {
         position:absolute;
         top:10px;
         margin-left:388px;
    div#sbux_lfrm {
         display:inline;
         font-size:10px;
         color:#FFFFFF;
         margin-left:245px;
         top:49px;
         position:absolute;
         line-height:10px;
         font-family:verdana,arial,helvetica,sans-serif;
    div#sbux_lfrm form {
         margin:0px;
    div#sbux_lfrm a, div#sbux_lfrm a:link, div#sbux_lfrm a:hover, div#sbux_lfrm a:active, div#sbux_lfrm a:hover {
         color:#FFFFFF;
    div#sbux_lfrm form label {
         display:none;
         visibility:hidden;
    div#sbux_lfrm form input, div#sbux_lfrm form select {
         font-family:verdana,arial,helvetica,sans-serif;
         vertical-align:middle;
    div#sbux_lfrm input.example {
         color:#656565;
    #sbux_lfrm_row1, #sbux_lfrm_row2 {
         margin:0px;
    #sbux_lfrm input#username, #sbux_lfrm input#password, #sbux_lfrm input#password_pw {
         width:136px;
         margin-right:6px;
         font-size:10px;
    #sbux_lfrm select#roamRealm {
         width:130px;
         font-size:10px;
         color:#656565;
         margin-right:6px;
    #sbux_lfrm_row2 {
         position:absolute;
         top:21px;
         left:-4px;
    div#aupAgree_row {
         margin-top:4px;
         position:relative;
         left:-4px;
    div#aup_box {
         float:left;
         position:relative;
         top:-3px;
    div#aup_text {
         float:left;
         line-height:10px;
    div#tm_badge {
         width:115px;
         height:94px;
         float:right;
         margin-right:0px;
         margin-top:0px;
    div#password_value {
         display:inline;
    div#hidden_pw_field {
         display:none;
         visibility:hidden;
    div#sbux_lfrm.css_form {
         margin-top:0px;
    </style>
    <style>
    /* IE specs */
    body {
         font-size: x-small; /* IE5 Win */
         voice-family: "\"}\"";
         voice-family: inherit;
         font-size: small;
    html>body { /* be nice to Opera */
         font-size: small;
    /* self-clearing floats
    /* trigger hasLayout and target ie5+6/win only */
    *:first-child+html #header,
    *:first-child+html #login_wrapper {
         height:95px;
    #ny_legal {
         color:#CAC3BF;
         font-size:11px;
         font-weight:bold;
         padding:0;
    #ny_legal a:link {
         color:#CAC3BF;
         font-size:11px;
         font-weight:bold;
         padding:0;
    </style>
    </html>
    TOO LONG TO INCLUDE ALL CODE

    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp codebase="file:///C:\eclipse\workspace\studentconverter\webroot" href="studentconverter.jar" >two things wrong here -
    first codebase is not legal URL, File.separator (backslash on windows) needs to be converted to forward slash in URL's.
    second, the href is not to the jnlp file, it is to the jar !
    href="studentconverter.jar" - should this be href="studentconverter.jnlp" ?
    /Dietz

  • Script error "object required" when log off

    I have created a new user and assigned the "Everyone" role to it. I log in to the portal using this new user. Then I press logoff. Then I press OK. Now I get the script error below:
    line:91
    char:8
    Error: Object required
    code:0
    URL: http://.....
    any idea why I get this error?
    note: I don't get a logoff error when I use the administrator or other user IDs.

    Hi,
    you are using a customized masthead. InSP14 SAP changed some Javascript and therefor, the "object" your are colling in your logoff() function is missing. You'll have to comment out this JS call in your masthead. Check the IE error message explanation, it will show you the line where the error occurs.
    I've already posted the solution in this forum, but unfortunately, I'm not able to find my previous post
    br,
    Tobias

  • Error: Making this change would require changing code that is locked....

    DWCS3
    Rebuilding site -- I know this is a common problem, but what are the steps to resolve it?
    Error: "Making this change would require changing code that is locked by a template or a translator.  The change will be discarded."
    Click OK and the change is made anyway, oftentimes resulting in loss of document CSS and dynamic code, which is then unretrievable. EXTREMELY FRUSTRATING!!!
    There is another code at the top of all documents using the template:
    "<!-- InstanceBegin template="/Templates/index.dwt" codeOutsideHTMLIsLocked="false" -->"
    However, this line has always been in my previous documents and created no problem.
    The oddest thing is, I can be in an editable region of a document, click on an image to edit in Fireworks, edit, click DONE and it comes back in DW with that error. ???

    Looking at DW preferences, I found two Fireworks editors listed for .png, .gif, and .jpg.  Maybe that was causing a problem.
    Don't know if this will help, but....
    Here is sort of what my template code looks like:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml">
      <!-- DW6 -->
            <head>
           <!-- TemplateBeginEditable name="meta" -->
      <meta name="keywords" content="blah blah blah" />
      <meta name="description" content="blah blah blah/>
      <meta name="robots" content="noarchive, nofollow" />
      <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="cache-control" content="no-cache" />
      <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
      <meta name="google-site-verification" content="8KWIMcjzjngBlH7XsAnwF4W5M_novbbavDYWk2YIZgk" />
      <link rel="shortcut icon" href="/favicon.ico" />
              <!-- TemplateEndEditable -->
        <!-- TemplateBeginEditable name="doctitle" -->
      <title>document title</title>
              <!-- TemplateEndEditable -->          
                    <!-- TemplateBeginEditable name="stuff" -->
                    <link href="../CSS/file.css" rel="stylesheet" type="text/css" />
                    <link href="../CSS/file.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    function MM_popupMsg(msg) { //v1.0
      alert(msg);
    //-->
    </script>
            <!-- TemplateEndEditable -->
    </head>
    Here's code from a document using the template:
      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html xmlns="http://www.w3.org/1999/xhtml"><!-- InstanceBegin template="/Templates/main.dwt" codeOutsideHTMLIsLocked="false" -->
      <!-- DW6 -->
            <head>
           <!-- InstanceBeginEditable name="meta" -->
      <meta name="robots" content="noarchive, nofollow" />
      <meta http-equiv="pragma" content="no-cache" />
      <meta http-equiv="cache-control" content="no-cache" />
              <!-- InstanceEndEditable -->
        <!-- InstanceBeginEditable name="doctitle" -->
    <title>my document title</title>
    <script type="text/javascript">
    function toggleMe(a) {
    var e=document.getElementById(a);
    if(!e)return true;
    if(e.style.display=="none") {
    e.style.display="block"
    else{
    e.style.display="none"
    return true;
    </script><!-- InstanceEndEditable -->          
                    <!-- InstanceBeginEditable name="stuff" -->
                    <link href="CSS/file.css" rel="stylesheet" type="text/css" />
                    <link href="CSS/file.css" rel="stylesheet" type="text/css" />
            <script type="text/javascript">
    <!--
    function MM_openBrWindow(theURL,winName,features) { //v2.0
      window.open(theURL,winName,features);
    function MM_popupMsg(msg) { //v1.0
      alert(msg);
    //-->
    </script>
      <style type="text/css">
    <!--
    .blahblahblah {
    padding: 0 100px 20px 125px;
    line-height: 1.3em;
    .blehblehbleh {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    color: #006666;}
    -->
                     </style>
    <!-- InstanceEndEditable -->
    </head>

  • EEWB Extension deletion " Field changes can require table conversion"

    Hi
    Wihile iam trying to delete extensions in EEWB (created in  a transaction ) it is giving me the below error
    Field changes can require table conversion
    Message no. OXT_MISC328
    Diagnosis
    Not all databases permit deletion of fields in existing tables. Deletion may be required when making changes. In this case, the table must be converted, and then it has the status Partially active. The extension is otherwise flagged as having errors.
    Procedure
    Take the tables that are to be converted from the log. Use the database utility to make the conversion. Conversion may require a lot of time and resources. Then repeat the transaction in the Easy Enhancement that led to this message.
    The Request which contains the extension has already been transported  can any help me out in this
    Edited by: Nanda Kishore on Sep 2, 2009 8:16 AM

    Hi Kishore,
    Go to Database Utility (SE14) --> select the table names from you log and (in next screen) press button Activate & Adjust database and check that the Status becomes Active. Depending on the size of table , might take some minutes to activate this table.
    Cheers
    Jignesh

  • Script Error after making changes

    First, I am not a website designer. I own a website and have
    been making minor (text) changes using Contribute since I didn't
    need to know html. I started a couple of years ago just using the
    trial and never had any problems with it, but about a month ago
    bought it...CS3.
    After sitting down and making some changes, I published and
    then got:
    Script Error
    Line: 17
    Char: 1
    Error: Object required
    Code: 0
    URL;
    http://www.dirty-dog.com/contact/
    I've looked at the source code, found line 17, but have no
    idea what I'm supposed to do. I think this is an easy fix, right?
    Can someone explain in "plain english" what I need to do?
    Also, one day I somehow fixed it...just by moving stuff
    around on the page. I also made some changes to other pages,
    thought they were published (looked at all of them), but when I
    went back yesterday, all the changes were gone?!? How is that
    possible??? I'm going to try to paste the code here....

    This is the contents of my log4j.xml, its under WEB-INF/lib
    <?xml version="1.0" encoding="UTF-8" ?>
    <!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
    <log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
      <!-- A1 is set to be a ConsoleAppender -->
      <appender name="sout" class="org.apache.log4j.ConsoleAppender">
        <!-- A1 uses PatternLayout -->
        <layout class="org.apache.log4j.PatternLayout">
          <param name="ConversionPattern" value="%d [%c] %p - %m%n"/>
        </layout>
      </appender>
      <root>
        <!-- Set root logger level to DEBUG and its only appender to A1 -->
        <priority value="off"/>
        <appender-ref ref="sout"/>
      </root>
    </log4j:configuration>

  • Making FieldA required when user changes value of FieldB

    Is this possible.
    When the user is filling out the form, the required state of fields needs to change based on input gathered from the user.
    FieldA - TextField
    FieldB - DDList - Values Yes and No
    FieldA should be required if the user sets FieldB to Yes, but it should be required if they set the value to No.

    I figured out how to change this, however I have one obstacle yet. The highlighting does not automatically refresh? I have to manually uncheck the required fields checkbox and reselectit for the highlighting to update.

  • SPEL? make REASON field required if user has changed the value in SALARY

    I have a requirement to make REASON field required if user has changed the value in SALARY field. Is it possible using spel? what are my options?

    Karan,
    You can change the Rendered Property through personalization.
    But in your requirement you need to attach the Spell through personalization & extend the existing CO to set the value of the SPELL based upon the condition.
    Note - Refer this thread http://forums.oracle.com/forums/thread.jspa?threadID=2176729&tstart=0. If you have worked on SSHRParams kindly help the user.
    Regards,
    Gyan

  • I am trying to authorize my computer and I get an error message: The required directory was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed. Help?

    I am trying to authorize my computer and I get an error message: The required directory was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed. Help?

    I used Terminal to change the permissions on the folder in question.  I followed the instructions in this article:
    iTunes: Missing folder or incorrect permissions may prevent authorization
    In my case, the folder was there, so I needed the command to change permissions on the folder, not to create one.   I was hesitant to use Terminal b/c I know that if I made an error I could wipe out my hard drive or render my computer unusable.  So to be SURE I didn't make an error, I carefully copied the command from that page and *pasted* it into Terminal.  Also, before I could do anything in Terminal, I had to go change my admin password (it had been a blank password before and that's not acceptable for making changes in Terminal).  I was just super careful when entering my password or doing anything else while Terminal was open (making sure I didn't accidently hit the spacebar or another key, etc.)  And it fixed the problem right away.
    What was confusing for me was that the iTunes error message said to change permissions in the FINDER, which is what I was trying to do.  It didn't mention Terminal.  What would really be helpful is if Apple included a link to a page like this in their error message.

  • An error occcurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script"

    We've been getting the following error for some time now.
    An error occurred on line 105 while executing script 'MOM Backward Compatibility Service State Monitoring Script'
    Source: Microsoft VBScript runtime error
    Description: The remote server machine does not exist or is unavailable: 'GetObject'
    One or more workflows were affected by this.
    Workflow name: System.Mom.BackwardCompatibility.ServiceStateMonitoring
    Instance name: server.domain.local
    Instance ID: {INSTANCE}
    Management group: GROUP
    Unfortunately the instance in question has since been decommissioned and simply does not exist any more. 
    We're currently on a repeat count of over 350,000 and I would REALLY like to get it stopped. I've had a look at adding an override but that points to the management server rather than the instance itself.
    Does anyone have any suggestions?
    thanks in advance!

    Hi Steven,
    There are for option for us to override a monitor ot rule:
    For all objects of class:             
    Class            
    When you select this option for your override, the override settings apply to all objects in the class at which the rule or monitor is targeted.
    For a group            
    When you select this option for your override, the override settings apply only to members of the group. The rule or monitor without the override settings continues to apply to all objects in the targeted class except for those objects that are also members
    of the group used for the override.
    When you create a group, you save it to an unsealed management pack. However, an element in an unsealed management pack, such as an override, cannot reference an element in a different unsealed management pack, such as a group. If you are going to use a group
    to limit the application of an override, you must either save the group to the same unsealed management pack as the override, or you must seal the management pack that contains the group.
    For a specific object of class:             
    Class            
    When you select this option for your override, the override settings apply only to the specified object. The rule or monitor without the override settings continues to apply to all other objects in the targeted class.
    For all objects of another class            
    When you select this option for your override, the override settings apply only to objects of a class other than the targeted class. The rule or monitor without the override settings continues to apply to all objects in the targeted class.
    Did you try to override it for a specific object of class?
    Regards,
    Yan Li
    Regards, Yan Li

  • HT1848 I cannot authorize my computer, I'm having this error message The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed." please hel

    cannot authorize my computer, I'm having this error message The required file was not found or has a permissions error. Correct this permissions problem and try again, or deauthorize this computer if the permissions cannot be changed." please help me

    Doublechecking. In the course of your troubleshooting to date, have you worked through the instructions from the following document?
    iTunes: Missing folder or incorrect permissions may prevent authorization

  • Error "field required" in master-detail form with FORMS 10G!!

    I have a Master-Detail Form.
    When the cursor stay in detail block and i chage the master record with the mouse, clicking in scroll bar, i get error "field required".
    In Forms 6i, works fine!!

    Master block has more than one record displayed. When I click on any item in detail (except first one) and then click on different master record (return navigation to master block, but not current record) I have FRM-40202: Field must be entered on first item in detail block.
    I found that reason is this part of clear_all_master_details procedure (automatically created by Oracle Forms):
    IF :System.Cursor_Item <> startitm THEN
    Go_Item(startitm);
    Check_Package_Failure;
    END IF;
    Does any have same experience?
    Is it Oracle bug or I am missing something?

  • The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook - error message

    I applied Exchange Server 2013 SP1 and since then some users are getting error message:
    'The Microsoft Exchange Administrator has made a change that requires you quit and restart Outlook' on their MS Outlook.
    Have tried a number of options including repairing the affected user accounts to no avail.
    Any idea on how to resolve this will be appreciated.
    NB: This error was not there before applying SP1.

    kindly need help. i have same message "'The Microsoft Exchange Administrator has made a change that requires
    you quit and restart Outlook' on their MS Outlook"
    this is comes after applying 2013 sp1

  • Calculating 2 fields without a script error.

    Is there a way to make a calculation of two fields not calculate until the 3rd field is reached.  I have a calculation that takes (field1/field2)*100.  Once the user puts in field1, it throws a script error, which is annoying.  Anyway around this???
    Thanks for your help.

    You need to test to make sure there is a value in the fields first.
    Using FormCalc:
    if (HasValue(field1) and HasValue(field2)) then
        $ = field1 / field2 * 100
    endif
    Or JavaScript:
    if (!field1.isNull && !field2.isNull) {
         this.rawValue = field1.rawValue / field2.rawValue * 100;

Maybe you are looking for

  • Nothing is working ri

    I bought a sound blaster audigy SE, and the front 2 speakers are the only thing that played music even though when i click test the voice went through each speaker, and updated it and now when i select 5. nothing happens the picture that i gives only

  • Getting the error Essbase ANCESTOR_NAMES property is empty

    Hi All, We are getting the below issue. We are connecting to Essbase outline from OBIEE. What is causing this issue ? Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has

  • Download request results with message to get netframework plug in

    I've been unsuccessful in finding a correct net framework from windows so I can download files again...this all started after my computer crashed and someone had to wipe it clean

  • Clear the Prompt values in dashboard page

    Hi Experts, In our Dashboard page has 5 different table view report with Prompt option for each reports and clear filters option, when I click the any clear filter option it affect all the (5) prompts. But I want to clear for each prompts separately,

  • Masking is not working in Breeze

    I am importing a swf into a ppt using the Breeze insert Flash. Once converted, the masking around the swf/flash file is not showing up. I have a mask around my animation in order to hide any items I don't want to show. In presentation mode with Power