1

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?

  • Did you find a solution for this problem? I Have the same problem. – user6397 Jan 13 '12 at 11:57
1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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