Settings with Two Slices and Branches

StatusIDPriorityType
Open37362MajorQuestion
ProfileReply
gabossoloClient

Hello,

Coud you please help me to use the Settings with two slices and branches?
I'm trying to implement your example but facing an issue with "UserWithBranch" interface...

Thank you!

SettingsAccessor.CreateServiceInstance = xafApplication => new SettingsAccessorDesigner().Slice1().Slice2(getName: slice => slice.SliceObject.UserName, getParentSliceObject: slice => slice.SliceObject.Branch, getSliceObjectsCriteria: slice => CriteriaOperator.Parse("Branch = ?", slice.SliceObject)).SetupCurrentSlice(accessor =>
{
var currentUser = SecuritySystem.CurrentUser as UserWithBranch;
if (currentUser != null)
accessor.ObjectSpace.AppSettings().CurrentSlice(currentUser.Branch, currentUser);
}).CreateSettingsAccessor();

Replies

UserDescriptionPosted On
MariyaVoytovichAgent

Hello gabossolo!

Can you provide me with code samples (UserWithBranch and slice) or a small project that shows an error.

Feel free to contact us if you have any questions.

Regards,
Mariya
On behalf of Xafari Client Services Team

Write US