Hi!
I'm trying to build a simple GI so that a client can easily review which customer have been added to a Group or groups.
Any ideas?
Thanks in advance!
Regards.
Hi!
I'm trying to build a simple GI so that a client can easily review which customer have been added to a Group or groups.
Any ideas?
Thanks in advance!
Regards.
Yes, I agree with you, there are many combinations that makes creating this GI practically impossible. First I must know all the combinations, second, if you keep adding and/or modifying the groups the combinations will never be the same.
Thank you very much to everyone for your effort and support on this topic!
So if one GroupMask was 0x80000000 and another was 0x00600000 then if one entity was in both groups their mask would look like 0x80600000, which can be difficult to pull apart and I’m not certain how it would look if one group is letters and another is numbers, I have little experience trying to make GIs based off restriction groups, mainly because of the difficulty it can be.
If you know all the combinations of groups though then it could make a GI easier by using like a Switch() function.
Hi
I have tried and researched for a long time, but I don't have a correct result in the GI.
Regards.
Hi
Regards.
Hi
There's no limit in the number of records in the GI.
The customer only uses Group Type ‘A’.
The GI shows the 2891 customers, that it's the same that the number of customers in the GI ‘Customers’
Regards.
Interesting…. I didn’t have that same experience with this… Is your GI limiting results to X amount of records? Are you using multiple group types other than GroupType ‘A’? I.E.: inverse groups?
Hi James!
Thanks! I did some tests with 3 groups and the GI returns 0 and 1 as you said, but unfortunately it doesn't seem to work either, for example, the GI for the “erika” group shows me 40 records, but the group has more than 800 customers in it.
Same case with “GERARDO” group, if I filter by his formula only number 1, return 0 lines, but GERARDO has about 98 customers assigned.
Regards!
I see… Let’s take a slightly different approach - The Wyatt Erp Approach…
Acumatica stores the Group information in a table called RelationGroup. It stores what object is part of each Group Restriction information on the records themselves. In your case, that would be the Account and Sub tables. It stores this in the GroupMask field, which is present on each of these tables as well as any others that can be a part of a group (BAccount, InventoryItem, etc.). All of the GroupMask fields are stored in the DB as a varbinary type (which is basically a list of 1s and 0s). This lets them store multiple pieces of information in the same field, and they use bitwise Math to get the values out.
The simplest way to check if a record is in a restriction group:
Make a Relation. Customer is Parent, RelationGroup is Child
Include the fields you want in Results Grid. Add this line:
=CInt((CLong(eCustomer.GroupMask])%(CLong(pRelationGroup.GroupMask])*2))/CLong(sRelationGroup.GroupMask]))
This field will now return a 1 if the Customer is part of "YourGroupName" or a 0 if it isn't.
I don't have them written out for the A, A Inverse, B, B Inverse types, but if you want to take this further, then check out RelationGroup.GroupType.
The results will return a GI that looks something like this:
Where you have the customer name, the group name and a 1 or 0 as a true/false as to whether or not there’s a membership there.
In the tables, you’ll want to create an alias for each RelationGroup you have:
For the Relations, you’ll want to add a relationship for each group name to each alias as follows:
I’ve only included 3 here, but as you can see, they’ll add up depending on how many restriction groups you have. In your results grid, you’ll want it to look something like this:
You can call out these groups by joining them to any other table that’s restricted as well, and get similar results using the same structure.
I’ve attached a sanitized version of the GI where you’ll just need to add in your groups and add more tables/aliases as needed. Hopefully this solves your dilemma. ;)
Have fun!
James
Thanks James!
I have already reviewed the GI you send me (I had already tried it that way), however it presents incorrect information, for example:
The customer CONDUCTORA ELECTRICA only has 4 restriction groups selected.
But the GI show me the customer -CONDUCTORA ELECTRICA- repeated for every restriction group that exists.
Regards!
Here’s a very simple one I threw together. You’ll probably want to throw in some additional fields or adjust it for your use case. ;)
You’ll need to make sure the user viewing it has appropriate rights to view all the restriction groups or it will be incomplete information.
Let me know if this helps.
Thanks for your suggestion James!
The real issue is because this client has more than 1,000 customers, and review one by one is not helpful, that's why we need to create a GI in order to review all the customers whit their restriction group assigned.
Regards!
There’s an out of the box GI called Restriction Groups by Customer that could give you the inverse of AR201000. It’s ScreenId AR102010.
How would you like the data displayed?
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.