Announcements
hi,
I add two fields in sales table custgroup, subgroupid. from--- i change the value of customer group field select 10 custgroup than subgroupid is not selected same cutomergroup.
Hi satendra singh,
The code looks correct. One thing I can't see in the screenshot is if you have a break statement after the case statement for field "CustGroupId".
Here you are setting the Sub-group Id to the value set for the same field in the customers form. If this code is still not setting the value for you, did you try to debug this method and check if the correct values are being fetched in this method?
Hi Gunjan,
I am writing the code in SalesTable /Methods /ModifiedField. Still I am facing this issue.
Hi satendra singh,
Were you able to get this working? Or are you still facing any issues?
hi,
Yes
Ok, then just add your code in the modifiedField method of SalesTable.
If modified field is CustGroupId, select first customer sub group that has the same customer group id, and put that in the sub group field. Is it clear?
hi,
Do you want to automatically set subgroup, based on the selected customer group?
yes.
Hi Gunjan,
Sub Group Id is Customized field. whenever i changed the customer group that time sub groupid default first value select .
I'm sorry but I don't understand.
Do you want to automatically set subgroup, based on the selected customer group?
Or do you want to only show subgroups related to specific customer group in the lookup?
If you just want to impact the lookup, make sure that you have properly defined table relations between your SalesTable fields and Customer sub group table. The relation should include customer group id and customer sub group id. Then the user can only select such subgroups that are related to the already selected customer group.
Hi,
i modify the custgroup like that i selected coustmergroup 10 than sub groupid field default select first value .
Hi satendra singh,
Is Sub group Id a customized field? You will need to write your code in Tables\SalesTable\modifiedField method to assign the new sub group Id whenever the customer group is changed.
André Arnaud de Cal...
294,120
Super User 2025 Season 1
Martin Dráb
232,866
Most Valuable Professional
nmaenpaa
101,158
Moderator