You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Until we get a great solution and nice looking API around this one, there are a few kind of dirty workarounds:
/// use this static list, clean up ModelWeigh for typeof(ListDefinition)/// this thing controls how definitions relate to each other and what's the order while provisioningDefaultModelWeigh.Weighs// default model weight looks as following:// https://github.com/SubPointSolutions/spmeta2/blob/master/SPMeta2/SPMeta2/Common/DefaultModelWeigh.cs
Another way around is to implement your own DefaultModelWeighService similar to this:
// https://github.com/SubPointSolutions/spmeta2/blob/master/SPMeta2/SPMeta2/Services/Impl/DefaultModelWeighService.cspublicclassMyDefaultModelWeighService:DefaultModelWeighService{/// override this method and retuen your own weighs for ListDefinitionpublicoverrideIEnumerable<Common.ModelWeigh>GetModelWeighs(){returnDefaultModelWeigh.Weighs;}}// then register your custom service instead of out of the box one:provisionService.ReplaceService(typeof(ModelWeighServiceBase),newMyDefaultModelWeighService());
These would be really dirty workarounds to get things moving.
Also, this ticket relates to Option to use the order of nodes in which it is defined on model #1014
Meta seems to be sorting fields added to the list by type.
Is there a way to remove that sorting cause its is expected to fields to be added in the order they are defined in the code ?
I'm using StandardCSOMProvisionService
SPMeta2FileVersion : 1.2.17191.0958
CSOMProductVersion: 16.1.5715.1200
SharePoint 2016 OnPrem
The text was updated successfully, but these errors were encountered: