[BUG] GetValue for LookupItem returns value twice
See original GitHub issueBug Report
Issues should only be created for items related to covered functionality.
Not covered functionality, feature requests, and questions should use the Feature Request or Question templates.
EasyRepro Version
- Microsoft Dynamics 365 Online Version 8.2 (8.2.x) (DB 8.2.x) online
- Microsoft Dynamics 365 Online Version 9.0 (9.0.x) (DB 9.0.x) online
- Microsoft Dynamics 365 Online Version 9.0.2 (9.0.2) (DB 9.0.2) online
- Microsoft Dynamics 365 Online Version 9.1 (9.1.x) (DB 9.1.x) online
UCI or Classic Web
- UCI (XrmApp)
- Classic Web (XrmBrowser)
Online or On Premise
- Online
- On Premise
Browser
- Chrome
- Firefox
- IE
- Edge
Describe the bug
After the latest update getting values from lookup items, the resulting string appears as “Value; Value” instead of just “Value”.
The used lookup attributes have definitely one single element.
Special formatting / display
none
Code to reproduce
string countryValue = App.Entity.GetValue(new LookupItem(){ Name="tk_countryregionid" });
Assert.AreEqual("Germany", countryValue);
Result: 'Message: Error at "Assert.AreEqual". Expected:<Germany>. Current:<Germany; Germany>.'
Expected behavior
GetValue for LookupItem shall return single display name only.
Screenshots
Additional context
Issue Analytics
- State:
- Created 3 years ago
- Reactions:3
- Comments:7 (3 by maintainers)
Top Results From Across the Web
N/A error while using the correct VLookup formula to get ...
Given this, just double check that both indeed are formatted as text vs. someone left-aligning a column of numbers. Let us know if...
Read more >Is this a bug? Or I don't understand something - iPlug2 Forum
What is causing the exception. It turned out that the GetValue() method returns an incorrect value. Or am I misunderstanding something?
Read more >Change log
Fixed a bug in vLookup "add new item" where lookup field values was not properly set. Changed the width of the lookup field...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Right!!.. Here the method
I’d suggest to split it before Asserting