Creating new record in Results Table giving Error

Hi All,
On update page there is a Results Table with Add button to create a new row.
While creating a new record on Results Table gives error
Attribute set for AccessId in view object XXLCUpdVariablesVO1 failed
I have checked EO and VO attributes, everything seems to be right.
Also Updatable is set to 'Always'.
Still don't know why this error is coming up.
Plz help to resolve this error.
Thanks,
SK

Ajay,
XML code
<?xml version='1.0' encoding='windows-1252' ?>
<!DOCTYPE Entity SYSTEM "jbo_03_01.dtd">
<Entity
Name="XXLCVarAssignmentsEO"
DBObjectType="table"
DBObjectName="XXLCOKC_VARIABLE_ASSIGNMENTS"
AliasName="XXLCVarAssignmentsEO"
BindingStyle="OracleName"
UseGlueCode="false"
RowClass="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEOImpl"
DefClass="oracle.apps.fnd.framework.server.OAEntityDefImpl"
CollClass="oracle.apps.fnd.framework.server.OAEntityCache" >
<DesignTime>
<Attr Name="_isCodegen" Value="true" />
<Attr Name="_version" Value="10.1.3.41.57" />
<AttrArray Name="_publishEvents">
</AttrArray>
<Attr Name="_panelSchema" Value="table|alias" />
<Attr Name="_codeGenFlag2" Value="Init|Delete|Access|Val" />
</DesignTime>
<Attribute
Name="AssignmentId"
IsNotNull="true"
ColumnName="ASSIGNMENT_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS"
PrimaryKey="true" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="AssignmentAccess"
IsNotNull="true"
Precision="30"
ColumnName="ASSIGNMENT_ACCESS"
Type="java.lang.String"
ColumnType="VARCHAR2"
SQLType="VARCHAR"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="30" />
</DesignTime>
</Attribute>
<Attribute
Name="VariableId"
IsNotNull="true"
ColumnName="VARIABLE_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="ListValueId"
IsNotNull="true"
ColumnName="LIST_VALUE_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="OrganizationId"
IsNotNull="true"
Precision="15"
Scale="0"
ColumnName="ORGANIZATION_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="TemplateId"
IsNotNull="true"
ColumnName="TEMPLATE_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="AuctionHeaderId"
IsNotNull="true"
ColumnName="AUCTION_HEADER_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="PoHeaderId"
IsNotNull="true"
ColumnName="PO_HEADER_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="CreatedBy"
IsNotNull="true"
ColumnName="CREATED_BY"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="CreationDate"
IsNotNull="true"
ColumnName="CREATION_DATE"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
SQLType="DATE"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="7" />
</DesignTime>
</Attribute>
<Attribute
Name="LastUpdateDate"
IsNotNull="true"
ColumnName="LAST_UPDATE_DATE"
Type="oracle.jbo.domain.Date"
ColumnType="DATE"
SQLType="DATE"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="7" />
</DesignTime>
</Attribute>
<Attribute
Name="LastUpdatedBy"
IsNotNull="true"
ColumnName="LAST_UPDATED_BY"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="LastUpdateLogin"
IsNotNull="true"
ColumnName="LAST_UPDATE_LOGIN"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Attribute
Name="AccessId"
ColumnName="ACCESS_ID"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
SQLType="NUMERIC"
TableName="XXLCOKC_VARIABLE_ASSIGNMENTS" >
<DesignTime>
<Attr Name="_DisplaySize" Value="22" />
</DesignTime>
</Attribute>
<Key
Name="SysC00329905" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AssignmentAccess" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;ASSIGNMENT_ACCESS&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329905" />
</DesignTime>
</Key>
<Key
Name="SysC00329906" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.VariableId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;VARIABLE_ID&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329906" />
</DesignTime>
</Key>
<Key
Name="SysC00329907" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.ListValueId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;LIST_VALUE_ID&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329907" />
</DesignTime>
</Key>
<Key
Name="SysC00329908" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.OrganizationId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;ORGANIZATION_ID&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329908" />
</DesignTime>
</Key>
<Key
Name="SysC00329909" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.TemplateId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;TEMPLATE_ID&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329909" />
</DesignTime>
</Key>
<Key
Name="SysC00329910" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AuctionHeaderId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;AUCTION_HEADER_ID&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329910" />
</DesignTime>
</Key>
<Key
Name="SysC00329911" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.PoHeaderId" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;PO_HEADER_ID&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329911" />
</DesignTime>
</Key>
<Key
Name="SysC00329912" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.CreatedBy" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;CREATED_BY&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329912" />
</DesignTime>
</Key>
<Key
Name="SysC00329913" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.CreationDate" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;CREATION_DATE&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329913" />
</DesignTime>
</Key>
<Key
Name="SysC00329914" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdateDate" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;LAST_UPDATE_DATE&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329914" />
</DesignTime>
</Key>
<Key
Name="SysC00329915" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdatedBy" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;LAST_UPDATED_BY&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329915" />
</DesignTime>
</Key>
<Key
Name="SysC00329916" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.LastUpdateLogin" />
</AttrArray>
<DesignTime>
<Attr Name="_checkCondition" Value="&#34;LAST_UPDATE_LOGIN&#34; IS NOT NULL" />
<Attr Name="_isCheck" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329916" />
</DesignTime>
</Key>
<Key
Name="SysC00329917" >
<AttrArray Name="Attributes">
<Item Value="xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO.AssignmentId" />
</AttrArray>
<DesignTime>
<Attr Name="_isPrimary" Value="true" />
<Attr Name="_DBObjectName" Value="SYS_C00329917" />
</DesignTime>
</Key>
</Entity>
XXLCVarAssignmentsEOImpl Code
package xxlc.oracle.apps.okc.schema.articles.variables.server;
import oracle.apps.fnd.framework.OAAttrValException;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.server.OADBTransaction;
import oracle.apps.fnd.framework.server.OAEntityDefImpl;
import oracle.apps.fnd.framework.server.OAEntityImpl;
import oracle.jbo.AttributeList;
import oracle.jbo.Key;
import oracle.jbo.domain.Date;
import oracle.jbo.domain.Number;
import oracle.jbo.server.AttributeDefImpl;
import oracle.jbo.server.EntityDefImpl;
// --- File generated by Oracle ADF Business Components Design Time.
// --- Custom code may be added to this class.
// --- Warning: Do not modify method signatures of generated methods.
public class XXLCVarAssignmentsEOImpl extends OAEntityImpl
public static final int ASSIGNMENTID = 0;
public static final int ASSIGNMENTACCESS = 1;
public static final int VARIABLEID = 2;
public static final int LISTVALUEID = 3;
public static final int ORGANIZATIONID = 4;
public static final int TEMPLATEID = 5;
public static final int AUCTIONHEADERID = 6;
public static final int POHEADERID = 7;
public static final int CREATEDBY = 8;
public static final int CREATIONDATE = 9;
public static final int LASTUPDATEDATE = 10;
public static final int LASTUPDATEDBY = 11;
public static final int LASTUPDATELOGIN = 12;
public static final int ACCESSID = 13;
private static OAEntityDefImpl mDefinitionObject;
/**This is the default constructor (do not remove)
public XXLCVarAssignmentsEOImpl()
/**Retrieves the definition object for this instance class.
public static synchronized EntityDefImpl getDefinitionObject()
if (mDefinitionObject == null)
mDefinitionObject =
(OAEntityDefImpl)EntityDefImpl.findDefObject("xxlc.oracle.apps.okc.schema.articles.variables.server.XXLCVarAssignmentsEO");
return mDefinitionObject;
/**Add attribute defaulting logic in this method.
public void create(AttributeList attributeList)
super.create(attributeList);
OADBTransaction transaction = getOADBTransaction();
Number asgId = transaction.getSequenceValue("XXLC_VAR_ASG_SEQ");
setAssignmentId(asgId);
/**Add entity remove logic in this method.
public void remove()
super.remove();
/**Add Entity validation code in this method.
protected void validateEntity()
super.validateEntity();
/**Gets the attribute value for AssignmentId, using the alias name AssignmentId
public Number getAssignmentId()
return (Number)getAttributeInternal(ASSIGNMENTID);
/**Sets <code>value</code> as the attribute value for AssignmentId
public void setAssignmentId(Number value)
if (value != null)
OADBTransaction transaction = getOADBTransaction();
Object[] varKey = {value};
EntityDefImpl varDefinition = XXLCVarAssignmentsEOImpl.getDefinitionObject();
XXLCVarAssignmentsEOImpl variable =
(XXLCVarAssignmentsEOImpl)varDefinition.findByPrimaryKey(transaction, new Key(varKey));
if (variable != null)
throw new OAAttrValException(OAException.TYP_ENTITY_OBJECT,
getEntityDef().getFullName(), // EO name
getPrimaryKey(), // EO PK
"AssignmentId", // Attribute Name
value, // Attribute value
"AK", // Message product short name
"FWK_TBX_T_EMP_ID_UNIQUE"); // Message name
setAttributeInternal(ASSIGNMENTID, value);
/**Gets the attribute value for AssignmentAccess, using the alias name AssignmentAccess
public String getAssignmentAccess()
return (String)getAttributeInternal(ASSIGNMENTACCESS);
/**Sets <code>value</code> as the attribute value for AssignmentAccess
public void setAssignmentAccess(String value)
setAttributeInternal(ASSIGNMENTACCESS, value);
/**Gets the attribute value for VariableId, using the alias name VariableId
public Number getVariableId()
return (Number)getAttributeInternal(VARIABLEID);
/**Sets <code>value</code> as the attribute value for VariableId
public void setVariableId(Number value)
setAttributeInternal(VARIABLEID, value);
/**Gets the attribute value for ListValueId, using the alias name ListValueId
public Number getListValueId()
return (Number)getAttributeInternal(LISTVALUEID);
/**Sets <code>value</code> as the attribute value for ListValueId
public void setListValueId(Number value)
setAttributeInternal(LISTVALUEID, value);
/**Gets the attribute value for OrganizationId, using the alias name OrganizationId
public Number getOrganizationId()
return (Number)getAttributeInternal(ORGANIZATIONID);
/**Sets <code>value</code> as the attribute value for OrganizationId
public void setOrganizationId(Number value)
setAttributeInternal(ORGANIZATIONID, value);
/**Gets the attribute value for TemplateId, using the alias name TemplateId
public Number getTemplateId()
return (Number)getAttributeInternal(TEMPLATEID);
/**Sets <code>value</code> as the attribute value for TemplateId
public void setTemplateId(Number value)
setAttributeInternal(TEMPLATEID, value);
/**Gets the attribute value for AuctionHeaderId, using the alias name AuctionHeaderId
public Number getAuctionHeaderId()
return (Number)getAttributeInternal(AUCTIONHEADERID);
/**Sets <code>value</code> as the attribute value for AuctionHeaderId
public void setAuctionHeaderId(Number value)
setAttributeInternal(AUCTIONHEADERID, value);
/**Gets the attribute value for PoHeaderId, using the alias name PoHeaderId
public Number getPoHeaderId()
return (Number)getAttributeInternal(POHEADERID);
/**Sets <code>value</code> as the attribute value for PoHeaderId
public void setPoHeaderId(Number value)
setAttributeInternal(POHEADERID, value);
/**Gets the attribute value for CreatedBy, using the alias name CreatedBy
public Number getCreatedBy()
return (Number)getAttributeInternal(CREATEDBY);
/**Sets <code>value</code> as the attribute value for CreatedBy
public void setCreatedBy(Number value)
setAttributeInternal(CREATEDBY, value);
/**Gets the attribute value for CreationDate, using the alias name CreationDate
public Date getCreationDate()
return (Date)getAttributeInternal(CREATIONDATE);
/**Sets <code>value</code> as the attribute value for CreationDate
public void setCreationDate(Date value)
setAttributeInternal(CREATIONDATE, value);
/**Gets the attribute value for LastUpdateDate, using the alias name LastUpdateDate
public Date getLastUpdateDate()
return (Date)getAttributeInternal(LASTUPDATEDATE);
/**Sets <code>value</code> as the attribute value for LastUpdateDate
public void setLastUpdateDate(Date value)
setAttributeInternal(LASTUPDATEDATE, value);
/**Gets the attribute value for LastUpdatedBy, using the alias name LastUpdatedBy
public Number getLastUpdatedBy()
return (Number)getAttributeInternal(LASTUPDATEDBY);
/**Sets <code>value</code> as the attribute value for LastUpdatedBy
public void setLastUpdatedBy(Number value)
setAttributeInternal(LASTUPDATEDBY, value);
/**Gets the attribute value for LastUpdateLogin, using the alias name LastUpdateLogin
public Number getLastUpdateLogin()
return (Number)getAttributeInternal(LASTUPDATELOGIN);
/**Sets <code>value</code> as the attribute value for LastUpdateLogin
public void setLastUpdateLogin(Number value)
setAttributeInternal(LASTUPDATELOGIN, value);
/**getAttrInvokeAccessor: generated method. Do not modify.
protected Object getAttrInvokeAccessor(int index,
AttributeDefImpl attrDef) throws Exception
switch (index)
case ASSIGNMENTID:
return getAssignmentId();
case ASSIGNMENTACCESS:
return getAssignmentAccess();
case VARIABLEID:
return getVariableId();
case LISTVALUEID:
return getListValueId();
case ORGANIZATIONID:
return getOrganizationId();
case TEMPLATEID:
return getTemplateId();
case AUCTIONHEADERID:
return getAuctionHeaderId();
case POHEADERID:
return getPoHeaderId();
case CREATEDBY:
return getCreatedBy();
case CREATIONDATE:
return getCreationDate();
case LASTUPDATEDATE:
return getLastUpdateDate();
case LASTUPDATEDBY:
return getLastUpdatedBy();
case LASTUPDATELOGIN:
return getLastUpdateLogin();
case ACCESSID:
return getAccessId();
default:
return super.getAttrInvokeAccessor(index, attrDef);
/**setAttrInvokeAccessor: generated method. Do not modify.
protected void setAttrInvokeAccessor(int index, Object value,
AttributeDefImpl attrDef) throws Exception
switch (index)
case ASSIGNMENTID:
setAssignmentId((Number)value);
return;
case ASSIGNMENTACCESS:
setAssignmentAccess((String)value);
return;
case VARIABLEID:
setVariableId((Number)value);
return;
case LISTVALUEID:
setListValueId((Number)value);
return;
case ORGANIZATIONID:
setOrganizationId((Number)value);
return;
case TEMPLATEID:
setTemplateId((Number)value);
return;
case AUCTIONHEADERID:
setAuctionHeaderId((Number)value);
return;
case POHEADERID:
setPoHeaderId((Number)value);
return;
case CREATEDBY:
setCreatedBy((Number)value);
return;
case CREATIONDATE:
setCreationDate((Date)value);
return;
case LASTUPDATEDATE:
setLastUpdateDate((Date)value);
return;
case LASTUPDATEDBY:
setLastUpdatedBy((Number)value);
return;
case LASTUPDATELOGIN:
setLastUpdateLogin((Number)value);
return;
case ACCESSID:
setAccessId((Number)value);
return;
default:
super.setAttrInvokeAccessor(index, value, attrDef);
return;
/**Gets the attribute value for AccessId, using the alias name AccessId
public Number getAccessId()
return (Number)getAttributeInternal(ACCESSID);
/**Sets <code>value</code> as the attribute value for AccessId
public void setAccessId(Number value)
setAttributeInternal(ACCESSID, value);
/**Creates a Key object based on given key constituents
public static Key createPrimaryKey(Number assignmentId)
return new Key(new Object[]{assignmentId});
Thanks,
SK

Similar Messages

  • When creating new records in any entity getiing error in mscrm 2011

    Dear all;
    when i try to create new record in any entity for example opportunity i am getting this error 
    Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=5.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Server was unable to process request.Detail:
    <OrganizationServiceFault xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.microsoft.com/xrm/2011/Contracts">
      <ErrorCode>-2147023878</ErrorCode>
      <ErrorDetails xmlns:d2p1="http://schemas.datacontract.org/2004/07/System.Collections.Generic"
    />
      <Message>Server was unable to process request.</Message>
      <Timestamp>2013-09-04T12:10:21.3522306Z</Timestamp>
      <InnerFault i:nil="true" />
      <TraceText i:nil="true" />
    </OrganizationServiceFault>
    please help

    Hi Anwar,
    As suggested above enable the trace, This would help you get the exact and detailed error.
    Steps:-
    1. Start the trace
    2. Reproduce the Error
    3. Stop the trace.
    4. Look in the log file and search for error.
    Thanks,
    Prasad
    Make sure to "Vote as Helpful" and "Mark As Answer",if you get answer of your question.

  • Ctx.SaveChanges() creates new records for related tables

    Ok, this is my first stab at EF Code first, so forgive me if this sounds stupid.
    I have a simple database and want to add a record in the main trans table. It has 2 foreign keys to 2 reference tables. I wire up the data entry screen in WPF (MVVM) and populate the entity. This entity has the correct references to existing records in the
    reference tables. 
    However when I call save changes it adds the trans record, but also ADDS new records to the reference tables (producing duplicates). I do not want to add records to the reference tables, but rather use the existing records.
    I'm sure it's a simple thing, but I am stuck.  Any help would be appreciated...
    Thanks,

    Thank you for the response. I probably didn't phrase it clearly...
    I have a simple Warehouse attendance app that will record when people are absent and the reason. I have 2 fixed reference tables. One is a list of employees, the other is a list of reasons (s - Sick, V - Vacation, etc...)
    User enters a date, then selects a employee from a drop down and a reason from a drop down.
    01/08/2015      Joe Smith     S - Sick
    Both the employee object and reason object (in my record class) point to valid existing records from their reference tables.(i.e employee Joe smith has an Id of 57) 
    When I call ctx.SaveChanges();
    it adds the record to the attendance file, but also adds a record to the employee and the reason table. I now have 2
    Joe Smiths in the employee table as well as 2 S - Sick Reason codes.  Joe Smith was added again and now the employee object points to Joe Smith with an Id of 58.
    Here is the record class:
    public class Record
        public int Id { get; set; }      
        public virtual Employee Employee { get; set; }
        public virtual Reason Reason { get; set; }
        public DateTime Date { get; set; }
        public string Notes { get; set; }
        public Record()
            Date = DateTime.Now;
        public string DayOfWeek
            get { return Date.DayOfWeek.ToString(); }

  • Using combination of insert into and select to create a new record in the table

    Hello:
    I'm trying to write a stored procedure that receives a record locator parameter
    and then uses this parameter to locate the record and then copy this record
    into the table with a few columns changed.
    I'll use a sample to clarify my question a bit further
    -- Create New Amendment
    function create_amendment(p_mipr_number in mipr.mipr_number%TYPE, p_new_amendment_number in mipr.amendment_number%TYPE)
    return integer is
    new_mipr_id integer;
    begin
    THIS is causing me grief See comments after this block of code
    insert into mipr
    (select mipr_id from mipr where mipr_number=p_mipr_number),
    (select fsc from mipr where mipr_number=p_mipr_number),
    45,
    (select price from mipr where mipr_number=p_mipr_number),
    practical,
    (select part_number from mipr where mipr_number=p_mipr_number);
    THe above will work if I say the following
    insert into mipr
    (select * from mipr where mipr_number=p_mipr_number);
    BUt, Of course this isn't what I want to do... I want to duplicate a record and change about 3 or 4 fields .
    How do I use a combination of more than one select and hard coded values to insert a new record into the table.
    /** Ignore below this is fine... I just put a snippet of a function in here ** The above insert statement is what I need help with
    select (mipr_id) into new_mipr_id from mipr where mipr_number=p_mipr_number + amendment_number=(select max(amendment_number) + 1);
    return new_mipr_id;
    end;
    THANK YOU IN ADVANCE!
    KT

    function create_amendment(p_mipr_number in mipr.mipr_number%TYPE)
    return integer is
    new_mipr_id integer;
    tmp_number number;
    tmp_mipr_id integer;
    begin
    tmp_number :=(select max(amendment_number) from mipr where mipr_number=p_mipr_number);
    Question:
    tmp_number :=1; works..
    tmp_number doesn't work with the select statement?
    Obviously I'm a novice! I can't find anything in my book regarding tmp variables... What should I look under is tmp_number a
    variable or what? In my Oracle book, variable means something different.
    Thanks!
    KT
    I have the following code in my stored procedure:
    Good luck,
    Eric Kamradt

  • To add new record into the table Data Service client

    When I am trying to add new record into the table Employeedetails using Data Service client it is giving a sql exception: "java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1."
    Code:
    DataService ds=DataServiceFactory.newDataService(getInitialContext(),"EmplDetApp","ld:EmplDetAppDataServices/EmployeeDetails");
    EmployeeDetailsDocument edoc=EmployeeDetailsDocument.Factory.newInstance();
    edoc.addNewEmployeeDetails();
    //here I set the primary key value empid
    edet.setEmpid("1212");
    edet.setEmpname("manu");
    ds.submit(edoc);
    Error
    EmpName 5 java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
    com.bea.ld.dsmediator.DataServiceException: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
         at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:247)
         at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:528)
         at com.bea.ld.dsmediator.update.DataServiceMediator.submit(DataServiceMediator.java:245)
         at com.bea.ld.ServerBean.submit(ServerBean.java:529)
         at com.bea.ld.Server_ydm4ie_EOImpl.submit(Server_ydm4ie_EOImpl.java:910)
         at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
         at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
         at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
         at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
         at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
         at java.lang.Thread.startThreadFromVM(Unknown Source)
    Caused by: java.sql.SQLException: Violation of PRIMARY KEY constraint 'PK__EmployeeDetails__6383C8BA'. Cannot insert duplicate key in object 'EmployeeDetails'. Severity 14, State 1, Procedure 'PC-P41403 null', Line 1
         at weblogic.jdbc.mssqlserver4.TdsStatement.processWarning(TdsStatement.java:1178)
         at weblogic.jdbc.mssqlserver4.TdsStatement.parseMsWarning(TdsStatement.java:1089)
         at weblogic.jdbc.mssqlserver4.TdsStatement.getMoreResults(TdsStatement.java:756)
         at weblogic.jdbc.mssqlserver4.TdsStatement.execute(TdsStatement.java:210)
         at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:97)
         at weblogic.jdbc.mssqlserver4.TdsStatement.executeUpdate(TdsStatement.java:1455)
         at weblogic.jdbc.wrapper.PreparedStatement.executeUpdate(PreparedStatement.java:147)
         at com.bea.ld.dsmediator.update.JDBCAdaptor.save(JDBCAdaptor.java:151)
         ... 15 more
    But I am not sure why it is giving an exception as Violation of PRIMARY KEY.
    The update method works fine for the same client.
    The exception only happens when I am trying to insert a new record.
    Please help me to figure out this problem.

    If you are absolutely sure that you do not have such a row already in your table, open a case with customer support and reference CR321312. I believe the work-around is to put ld-server-core.jar in your client classpath.
    Correction: put ld-server-app.jar in the client classpath
    Edited by mreiche at 09/17/2007 3:28 PM

  • Creating new records while querying existing record

    Hi,
    I have one master - detail form.
    First i created 1 record. Request ID is the primary key. Now request id generated. For ex.: 10
    Request Id, date, requestor , location, status fields are in header block.
    In lines block, i hv some other fields.. and one field called 'Activity'.
    While creating first record, the activity will be 'New'.
    Then i'll query the record '10'.
    when i'm changing the activity 'New' into 'Upgrade', it should create new record with new request ID.
    How to do this?
    I hv written procedure that, i'm taking field values to local variables. Then assigning the local variable values to field values.
    It is not creating as new record. It overwriting the existing record with new values. Existing record is missing.
    Pl. give steps.
    Thanks
    Kavi

    Hi,
    Okk, you will have to do two things. Create two trigger on block level on which you want to do your changes.
    1. First trigger. (PRE-UPDATE)
    In pre-update trigger u will have to write the complete insert statement into the same table with new req id. like
    DECLARE
    vReqNo DATA_TYPE;
    BEGIN
    SELECT MAX(REQ_ID)
    INTO vReqNo
    FROM your_table;
    INSERT INTO your_table
    (req_no, fields....)
    VALUES
    (vReqNo, :forms_values);
    END;
    2. Create 2nd trigger on block level (ON-UPDATE)
    write in this trigger
    NULL;
    for viewing the inserted record. What u have to do is in ON-UPDATE after null; create one timer NO_REAPEAT.
    and in timer u will have to set the block property to req_id = generated_req_id_from_pre_update_trigger and
    execute_query;
    hope it will work...
    -Ammad

  • Polling New Records in a table/Multiple servers

    We have a production environment that consists of 2 servers and I have a BPEL process that polls new records in a table and then sets flag as completed.
    Will this be a problem since we have more than one server?
    I ask this because I have another BPEL process that polls a FTP directory for files and then moves them after processing but when the process is put on the 2 servers, the process always becomes inactive and stops polling the directory, then I make it active again and it works for a little while and then becomes inactive again. I solved this be putting this process on my local SOA installation but I want to find a resolution for this.
    Thanks
    james

    The issue you have with the FTP adapter is that you have not configured it as a singleton adapter. Once this is done you will not have this issue.
    The DB adapter will not get the error that you get with FTP but you may get strange behavior if not configured correctly. If you are not using a sequencing file you should be ok as the dabase takes care of any locking. If you are using the sequencing function, e.g. sequence table then you may get 2 messages fired as both servers kick get the poll.
    To configure the db adapter for polling have a look at the following doc.
    http://download.oracle.com/docs/cd/E10291_01/core.1013/e10294/webapp.htm#CHDIDCGH
    cheers
    James

  • Imported Form and sub-form from another database. Sub-form not creating new records tied to parent form's data.

    I have imported all objects from an old access db (.adp file) into a new db (.accdb).  All of my data lives in sql server so I have added all the tables and views to the .accdb as linked tables.  My forms all connect to data, but I am having issues
    with a sub form.  The sub form does not allow for creation of children records tied to the parent record the way the old db did/does.
    Correct - old format .adp file (notice the empty second record in sub-form with the defaulted date of today's date):
    Incorrect - new .accdb file (notice the lack of empty second record in sub-form like above):
    If I click the create new record icon in the bottom of the subform, it creates a completely blank record not tied to the parent record (fields blacked out in screen shots above).  When using this button all parent record fields are blank.  
    I have also verified the child table used in the sub-form has a valid Fky relationship to parent table used in the parent form.
     

    Have you checked each forms 'Filter' property (in Design view) to make sure they are blank and that each forms 'Filter On Load' property to make sure it is set to 'No'? Also, you might try inserting the following commands in each forms On
    Open event:
    DoCmd.RunCommand acCmdRemoveAllFilters
    DoCmd.ShowAllRecords
    If you can open each forms Record Source and they are showing that new records are able to be entered (the new record * is showing at the bottom of the recordset), then check each forms On Load and On Open events to make sure there is no filtering.
    In addition, check any macro or VBA commands behind the button that opens the main form to make sure there is no SQL filtering in the DoCmd.OpenForm command.
    If one of the forms Record Source does NOT allow new records, then you will need to change that Record Source so the new record * indicator shows.
    Out of ideas at this point.

  • RH_INSERT_INFTY not creating new records

    Hi All,
    I am using the FM RH_INSERT_INFTY to insert new records in HRP1000.
    See the below FM call :
    CALL FUNCTION 'RH_INSERT_INFTY'
         EXPORTING
             fcode               = 'INSE'
             vtask               = 'D'
              order_flg           = 'X'
              commit_flg          = 'X'
              authy               = 'X'
              PPPAR_IMP           =
              OLD_TABNR           = ' '
              REPID               = ' '
              FORM                = ' '
                keep_lupd           = keep_lupd
         TABLES
              innnn               = it_i1000
         EXCEPTIONS
              no_authorization    = 1
              error_during_insert = 2
              repid_form_initial  = 3
              corr_exit           = 4
              begda_greater_endda = 5
              OTHERS              = 6.
    But instead of creating new records it is changing the existing record in HRP1000.
    Actually I want to create new records with different long text and short text in different languages so in case object id and object type even the dates can be same but the language would be different.
    So I need to create a new records with a different language key and different short text. But this function module is changing the existing object short text,long text and language.
    Could you please reply at the earliest.
    Thanks & Regards,
    Poonam

    Hi,
    you're right, this function didn't create new record when i want to create a record with same object but have different language.
    you can use  this function for your problem :  RH_INSERT_INFTY_DIRECT
    i tried and it works.
    CALL FUNCTION 'RH_INSERT_INFTY_DIRECT'
      EXPORTING
        vtask                     = 'V'
      KEEP_LUPD                 =
      tables
        innnn                     = p1000
    EXCEPTIONS
       NO_AUTHORIZATION          = 1
       ERROR_DURING_INSERT       = 2
       REPID_FORM_INITIAL        = 3
       CORR_EXIT                 = 4
       BEGDA_GREATER_ENDDA       = 5
       OTHERS                    = 6
    Regards,

  • Update new record in database table

    I'm working with TestStand 4.2 and MySQL database with user-defined tables.
    There is "test_results" table with autoincrement "id" (primary index).
    I want to:
    1. write a new record to the test_results table - some data and status "Running"
    2. run a test (pass to a test sequence its "id", test uses this id for writing data to database)
    3. update the record: set execution time and update status.
    So, the steps are as below:
    1. Open database
    2. Open SQL statement: "select * from test_results".
    3. Data Operation: operation - "Set and Put", record to operate on - "New - Create New Record". In the "Column/Parameter Values" tab I set the new record values.
    Here I want to retrieve the new record "id". How to do it?
    Thanks in advance.

    I am not sure how to implement this in Test Stand, but from an SQL programming perspective, you want to run:
    SELECT @@IDENTITY
    Here is a link to the description:  http://msdn.microsoft.com/en-us/library/ms187342.aspx
    It will retrieve the record ID of the row you just inserted.

  • How can I make the popup with empty fileds and create new record?

    I would like to use a popup to create new record.
    I created a af:popup by drag and drop a VO from data control to jsff. then, I created a button and place a af:showPopupBehavior. I was able to popup window by click the button.
    however, the window filled with the information from the 1st record. and when I select a record in table and click popup, the popup is filled with that record.
    How can I make the popup with empty fileds and create new record by saving the popup?
    Thanks

    You can have edit and new buttons, in the PopupFetchEvent identify button source (using popupFetchEvent.getLaunchSourceClientId()) if new button clicked clear the binding using below code.
    If you want to see empty fields, in the popup PopupFetchEvent clear the input component bindings.
    resetBindingValue("#{bindings.<componentid>.inputValue}", null);
        public static void resetBindingValue(String expression, Object newValue) {
            FacesContext ctx = FacesContext.getCurrentInstance();
            Application app = ctx.getApplication();
            ExpressionFactory elFactory = app.getExpressionFactory();
            ELContext elContext = ctx.getELContext();
            ValueExpression valueExp = elFactory.createValueExpression(elContext,expression,Object.class);
            Class bindClass = valueExp.getType(elContext);
            valueExp.setValue(elContext,newValue);
        }

  • Inserting new records into database table at runtime

    Hi all ,
    How to insert new records into database table at runtime on click update?
    Thanks.

    Hi Sasikala,
    Just for your understanding am giving a sample code snippet which you can use to read the contents of your Table UI element & save the data on to your database. Suppose you have a button up on pressing which you want to read the data from your screens table & save on to the database then you can proceed as shown below:
    1) Obtain the reference of your context node.
    2) Fetch all the data present in your table into an internal table using methods of if_wd_context_node
    3) Use your normal ABAP logic to update the database table with the data from your internal table
    In my example I have a node by name SFLIGHT_NODE and under this I have the desired attributes from SFLIGHT. Am displaying these in an editable table & the user would press up on a push button after making the necessary changes to the tables data. I would then need to obtain the tables information & save on to the database.
    data: node_sflight           type ref to if_wd_context_node,
            elem_sflight           type ref to if_wd_context_element,
            lt_elements            type WDR_CONTEXT_ELEMENT_SET,
           stru_sflight           type if_main=>element_sflight_node,
           it_flights             type if_main=>elements_sflight_node.
    "   navigate from <CONTEXT> to <SFLIGHT_NODE> via lead selection
        node_sflight_node = wd_context->get_child_node( name = 'SFLIGHT_NODE'  ).
       lt_elements = node_sflight->get_elements( ).
    "   Get all the rows from the table for saving on to the database
        loop at lt_elements into elem_sflight.
          elem_sflight->get_static_attributes( importing static_attributes = stru_sflight ).
          append stru_sflight to it_flights.
        endloop.
    " Finally save the entries on to the database
        modify ZSFLIGHT99 from table it_flights.
        if sy-subrc eq 0.
    endif.
    However a word of caution here.... SAP doesn't ever recommend directly modifying the database through an SQL query. You would preferably make use of a BAPI for the same. Try go through Thomas Jung's comments in [here|modify the data base table which is comming dynamiclly;.
    Regards,
    Uday

  • How to clear the previous  filter text when creating new record??

    Dear All,
    my question is i i created table having filter and sorting.
    when i m searching data through filter text data is coming but i want to clear that text(filter text) when i am creating new record.
    for my case when i am creating new record all blank field is coming but in that filter text box previous data is coming which one i was searching.
    but i need when i will create a new record tat filter text should be clear.
    Thanks
    Damby

    Damby, please tell us your jdev version.
    Check my blog http://tompeez.wordpress.com/2011/10/29/jdev-how-to-reset-a-filter-on-an-aftable/ you can add this to the button you use to create the new record.
    Timo

  • Add a new record in database table without using table maintance generator

    Hi Expart ,
                  Plz. tell me how to add new record in database table without using table maintance ganerator ....give me one ex.
    Regards
    Bhabani

    Hi,
    The other way to safely handle the modification of tables is through is by programs that can be done with SE38 or SE80.
    To insert into database table we use INSERT statement :
    1. To insert a single line into a database table, use the following:
    INSERT INTO <target> VALUES <wa>.
    INSERT <target> FROM <wa>.
    2. To insert a several lines into a database table, use the following:
    INSERT <target> FROM TABLE <itaba>.
    Or even we can use MODIFY statementas this single statement is used to insert as well as update the records of database table.
    MODIFY <target> FROM <wa>.
    or MODIFY <target> FROM TABLE <itab>.
    thanx.
    Edited by: Dhanashri Pawar on Sep 10, 2008 12:25 PM
    Edited by: Dhanashri Pawar on Sep 10, 2008 12:30 PM

  • How to identify new records in a table using OBIEE

    Hi,
    I have price change table as and when a record comes into this table i have to generate an alert. Then show a report with the price changes on which i can invoke an action to go into my transactional system to make the chnage. And once the change is made the process again starts to look for any new price chnage records that are recieved.
    Could anyone pls tell me how to identify new records in a table.
    Rgds

    SELECT ID, LastName, FirstName,
    RANK() OVER (PARTITION BY LastName,
    FirstName ORDER BY ID) AS SeqNumber
    FROM
    (SELECT ID, LastName, FirstName
    FROM Customers
    WHERE (LastName, FirstName) IN
    (SELECT LastName, FirstName
    FROM Customers
    GROUP BY LastName, FirstName
    HAVING COUNT(*) > 1)

Maybe you are looking for

  • I bought a song on iTunes, iCloud put in my phone, then I tried to listen and it disappeared. how do i get it back?

    I bought a song on iTunes to test out the iCloud app.  I saw it appear in my phone with a little gray circle next to it.  I tried to listen to it and it disappeared, but in my iTunes it said it was downloaded to the cloud.  How can I get it back on m

  • MM41 - how to create extra MAKT texts on SAVE? (BADI_ARTICLE_REF_RT)

    Hi, When a material is created or changed we need to make sure that materialdescriptions were maintained for certain languages. if some of the required are missing they should be automatically created by copy from an existing one. We believe BADI_ART

  • ShowDataEffect infinite loop

    Ok, for some reason my charting app has started displaying some really weird behavior.  It draws fine on the initial load, but if the user hit's reload (to look at a different time frame for example, it seems to redraw itself over and over again.  If

  • Right click - open in new tab

    when i open safari for the first time and want to open link from the page in the same window i do right click and press the option Open link in new tab, which is working only in the first tab window. as soon i open another one right click option are

  • InDesign only showing part of the image

    I'm doing a job for a client in InDesign CS5. I have not worked in CS5 before, so don't know if this is a bug or if I'm doing something wrong. It seems to happen randomly and I have checked the preferences and tried using different settings for the D