I have two objects A and B and they both are related to each other A-B(1-M) and I am using a grid control for B in the New/Edit Pages of A. I have a picklist field in object B with country values like Armenia, Aland, United Kingdom etc. I have selected the option of sorting in ascending order on this grid but every time I try to edit record A, the sort order changes and doesn't show me in the correct sort order i.e. Aland -> Armenia -> United Kingdom. Is there an existing issue with sorting in a Grid Control? I am on version 126.96.36.199. Private Cloud.
I've tested this on the latest build and I see that even after editing the record of Object A, the sorting on Object B's grid record is maintained.
Can you please share the Screenshot or the sample application xml to troubleshoot further.
Hello Mani Kumar ,
I have attached screenshots for the scenario I have described.
View Page (Correct):
Edit Page Sorting (Wrong): (3 different sorting orders on refresh)
Grid Control Settings:
Kindly let me know as to what am I doing wrong here.
Any suggestions on why this is happening?
I too tried a similar scenario in the Rollbase version 3.2.4, but could not see this problem.
Can you attach records and share the application xml?
Hello Karthikeyan Bhaskaran ,
I am on version 188.8.131.52. Would you think this would've been fixed in version 3.2.4?
Ok I found the issue. So basically if you see from the attached picture of the Grid Control settings that says "Lookup Options" and it shows "Use List View : All Countries" and my All Countries already has sorting applied on the list View sorting it by Country in Ascending order. Now when I try to apply it on the Grid Control in the Edit Page, I think it is trying to perform the sorting again and getting confused. I'm thinking this is possibly a bug because regardless of setting it on the List View and/or grid control, it should sort it in the ascending order. Any suggestions on why this is happening?
I've tested the same on 3.2 build and it works fine for me.
As per Karthik's suggestion, can you please share the app.xml (Please seed records of both the objects before exporting the app xml).
After repeated tests, one situation where I could see the odd sort order was if the original picklist itself did not use Alphabetical Sorting when assigning it default values. But, I could not see variation across pages.
For my test, I had initially set up values such as Armenia, Bhutan, China, Denmark and Ecuador with "Sort values alphabetically, not in the order entered". (Everything was in alphabetical ascending order independent of the order I choose.)
Then, I added "Chile" to the list and unchecked the box "Sort values alphabetically". After this, everytime I had data that involved Chile, China, the resultant grid showed incorrectly sorted records, even though the Sort indicator was "ascending" on my "countries" column. Does this ring similar to your configuration of picklist values?
In your screenshots I see that the sort arrow is Ascending on Countries but the actual listing appears different and has no order. Can you also share the screenshots of the complete pages? Or, if possible, your app xml with some data?
I forgot to mention that the countries picklist is basically a related field to a country object that contains the list of the countries with the country name as the record name so the alphabetical sort order does not matter in this case. If you notice in the screenshot I have specified under the lookup options that the country lookup is being used as a picklist and I am using a particular list view from the country. However as mentioned before in my previous post, I have managed to find out the issue but I just don't know if that is how it is supposed to behave.
Will it be feasible for you to share your app xml and some seed data? It will be extremely helpful for the investigation without having to resort to guesswork- what I have shared is only one scenario. You could also open a Support case and attach the xml to the case, if that is an acceptable alternative.
Yes sure. I have created a test application and attached it to this post that behaves in the same way as mentioned in my post. So if you go to the edit page that contains the grid control for "Adjustment Tests", you'll notice that the Ascending sort order of grid list items keep shuffling on refresh where as on the view page of "Group Tests", the related record list has the correctly sorted list of countries.Groups Test_v1.xml
I could not locate any fields other than the related field(s), in both objects. Something seems to be missing.
Please let us know also, which database are you using.