i want to know how to change Required Property on site column when it is consumed in a list definition.
like i have deployed a site column
<?xml version="1.0" encoding="utf-8"?>
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<Field ID ="{aae098f7-c7b0-4236-a8ec-9908e9acf2a0}"
Name="ABC"
Type="Lookup"
UnlimitedLengthInDocumentLibrary="TRUE"
DisplayName=" "
List="Lists/Directory"
ShowField="Title"
Required="FALSE"
Group="Custom"
Overwrite="TRUE"
OverwriteInChildScopes="TRUE"
Description=""
/>
</Elements>
i have declared it Required="FALSE" for a list Definition but when i reuse this column in another list definition i want to set it Mandatory, so in the content type that i have defined in the list definition (schema.xml) i made it Required="TRUE" as:
<ContentTypes>
<ContentType ID="0x01001CC809EB1E174539A92FDA8EEA9CABFD"
Name="xyz"
Group="custom CT"
Description=""
Inherits="FALSE"
Version="0">
<FieldRefs>
<FieldRef ID ="{97BA70AA-BC2C-496C-8565-56F99ABF91A4}" Name="R"/>
<FieldRef ID="{61389c59-cf0e-45ab-a6b4-30dca223f47c}" Name="C"/>
<FieldRef ID="{aae098f7-c7b0-4236-a8ec-9908e9acf2a0}" Name="ABC"/>
</FieldRefs>
</ContentType>
</ContentTypes>
<Fields>
<Field ID ="{97BA70AA-BC2C-496C-8565-56F99ABF91A4}" Name="R" Type="Lookup" DisplayName="$Resources:Region" List="Lists/Regions" ShowField="Title" Required="TRUE" />
<Field ID="{61389c59-cf0e-45ab-a6b4-30dca223f47c}" Name="C" Type="Lookup" DisplayName="$Resources:Country" List="Lists/Countries" ShowField="Title" Required="TRUE"></Field>
<Field ID ="{aae098f7-c7b0-4236-a8ec-9908e9acf2a0}" Name="ABC" Type="Lookup" DisplayName="$Resources:ABC" List="Lists/Brands" ShowField="Title" Required="TRUE" />
</Fields>
but it will remain not required . is there any way to make it required for one list , and not required for other list .
thankx in advance