Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I'm working on a simple bdc model in visual studio. i use the entity framework to access the data on the database.

Everything works fine (all CRUD operations) but in the "New item" form i have to set a value for the identifier (eg. ProductId). this field is not shown in the "edit form".

can i set a property in the bdc explorer to hide the identifier field in forms?

share|improve this question
    
Did you find a solution for this problem? I Have the same problem. –  user6397 Jan 13 '12 at 11:57
add comment

1 Answer

you have to delete identifier in the parameter with name "newParameter" Directon="In" for the method used for item creation. for example:

    <Method Name="Create">
      <Parameters>
        <Parameter Name="returnParameter" Direction="Return">
          <TypeDescriptor TypeName="AAA.SampleEntity, AAA" Name="returnParameter">
            <TypeDescriptors>
              <TypeDescriptor Name="idUnitaDiMisura" TypeName="System.Guid" ReadOnly="true"   IdentifierName="idUnitaDiMisura"/>
              <TypeDescriptor Name="dsUnitaDiMisura" TypeName="System.String"    />
              <TypeDescriptor Name="dtCreated" TypeName="System.Nullable`1[[System.DateTime, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]"    />
              <TypeDescriptor Name="CreatedBy" TypeName="System.String"    />
            </TypeDescriptors>
          </TypeDescriptor>
        </Parameter>
        <Parameter Name="newParameter" Direction="In">
          <TypeDescriptor TypeName="AAA.SP_UnitaDiMisura, AAA" Name="newParameter">
            <TypeDescriptors>
              <TypeDescriptor Name="idUnitaDiMisura" TypeName="System.Guid"  CreatorField="true"  IdentifierName="idUnitaDiMisura"/>
              <TypeDescriptor Name="dsUnitaDiMisura" TypeName="System.String"  CreatorField="true"  />
            </TypeDescriptors>
          </TypeDescriptor>
        </Parameter>
      </Parameters>
      <MethodInstances>
        <MethodInstance Type="Creator" ReturnParameterName="returnParameter" Name="Create" ReturnTypeDescriptorPath="returnParameter" />
      </MethodInstances>
    </Method>

in the newParameter I removed dtCreated and CreatedBy

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.