Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DependentLookupFieldDefinition: Id is not used #807

Closed
sebastianmattar opened this issue Mar 12, 2016 · 4 comments
Closed

DependentLookupFieldDefinition: Id is not used #807

sebastianmattar opened this issue Mar 12, 2016 · 4 comments

Comments

@sebastianmattar
Copy link
Contributor

DependentLookupFields will be created with random field Ids.

        var leadRecords = new ListDefinition
        {
            Title = "Lead Records",
            Description = "A generic list.",
            TemplateType = BuiltInListTemplateTypeId.GenericList,
            CustomUrl = "m2LeadRecordsList"
        };

        var leadRecordTypes = new ListDefinition
        {
            Title = "Lead Record Types",
            Description = "A generic list.",
            TemplateType = BuiltInListTemplateTypeId.GenericList,
            CustomUrl = "m2LeadRecordTypesList"
        };

        var leadTypeLookup = new LookupFieldDefinition
        {
            Title = "Lead Type",
            InternalName = "m2LeadType",
            Group = "SPMeta2.Samples",
            Id = new Guid("FEFC30A7-3B38-4034-BB2A-FFD538D46A63"),
            LookupListTitle = leadRecordTypes.Title,
            AddToDefaultView = true
        };

        var leadTypeIDDependentLookup = new DependentLookupFieldDefinition
        {
            Title = "Lead Type:ID",
            InternalName = "m2LeadTypeID",
            Group = "SPMeta2.Samples",
            Id = new Guid("FEFC30A7-3B38-4034-BB2A-FFD538D46A64"),
            PrimaryLookupFieldId = leadTypeLookup.Id,
            LookupField = BuiltInInternalFieldNames.ID,
            AddToDefaultView = true
        };

        var webModelLookupTargetList = SPMeta2Model.NewWebModel(web =>
        {
            web
              .AddList(leadRecordTypes);
        });

        var webModelLookupList = SPMeta2Model.NewWebModel(web =>
        {
            web
              .AddList(leadRecords, list =>
              {
                  list.
                    AddField(leadTypeLookup)
                   .AddField(leadTypeIDDependentLookup);
              });
        });

        // deploy the model to the SharePoint site over CSOM
        var csomProvisionService = new CSOMProvisionService();
        csomProvisionService.DeploySiteModel(clientContext, webModelLookupTargetList);
        csomProvisionService.DeploySiteModel(clientContext, webModelLookupList);
@sebastianmattar sebastianmattar changed the title DependentLookupFieldDefinition: Id is not user DependentLookupFieldDefinition: Id is not used Mar 12, 2016
@SubPointSupport SubPointSupport self-assigned this Mar 12, 2016
@SubPointSupport
Copy link
Contributor

Won't be touched, seems @sebastianmattar is working on that one.

SubPointSupport added a commit that referenced this issue Mar 15, 2016
DependentLookupFieldHandler: Support ID and InternalName (#807)
@SubPointSupport
Copy link
Contributor

Both CSOM and SSOM tests fail - the regression tests, and the fields show nothing in the UI. Checking.

SubPointSupport added a commit that referenced this issue Apr 19, 2016
+ Potential issue with DepedentLookupFieldDefinition.ShowInDisplayForm #753
+ DependentLookupFieldDefinition: Id is not used #807
@SubPointSupport SubPointSupport modified the milestones: 2016.04.25, 2016.05.30 - DependentLookup May 26, 2016
@SubPointSupport
Copy link
Contributor

CSOM passed apart CanDeployRandom_DependentLookupFieldDefinition as in relation to Potential issue with DepedentLookupFieldDefinition.ShowInDisplayForm #753 and property updates.

@SubPointSupport
Copy link
Contributor

All passed, as well as Potential issue with DepedentLookupFieldDefinition.ShowInDisplayForm #753
Check more details on #753 for CSOM based provision and limitations.

SubPointSupport added a commit that referenced this issue May 30, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants