xpath constraint relation in reference set select page
My domain is currently like this : Company 1- many Account. ( 1 company has many accounts, 1 account only belong to 1 company ) Project many – many Account ( 1 project may has many accounts, 1 account may take care of many project ) To select which Account is associate with which Project, I am using a Reference Set selector in Project_NewEdit page. In the select page, I use xpath to retrieve an account list with required roles. (account multiple select is requried) Now I want to add xpath to only show account that belong to same company as the project owner/creator. Is there anyway to do this via xpath? I try using microflow instead of xpath but then the select button will become unavailable.
In order for the xpath to work, instead of using the default owner association i suggested creating a new association, something like: Project_Account_Owner, and set this association on the creation of the object.
Then you can use the following xpath:
[YourDomainModel.Company_Account/YourDomainModel.Company/YourDomainModel.Company_Account/Administration.Account/YourDomainModel.Project_Account_Owner = '[%CurrentObject%]']
Mind you, because you are using xpath on the reference selector the project should be committed in the database in order for it to work.