Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Get the user input value in a grid - value is invalid (not found in the referenced table)

(2) ShareShare
ReportReport
Posted on by 115
Hi,
 
how could I access the input value of user within a button clicked method:
 
 
The value (e.g.: 945) is invalid because it is not referenced in the related table. Therefore I want to run a method (by clicking on the button), which will create the referenced entry . I tried two different approaches and both return 0:
- access via datasource (SSBWorkintTimeLine)
- access via FormIntegerControl (SSBWorkingTimeLine_DevOpsWorkItemId)
 
 
How could I access the user value?
 
Thanks for any hint.
Sebastian
Categories:
  • Basti Aurand Profile Picture
    Basti Aurand 115 on at
    Get the user input value in a grid - value is invalid (not found in the referenced table)
    the user enters the invalid value in the "create phase" of the record (directly after hitting the "New" button). Of course the record could not be saved to the DB because it's reference is missing (as the warning says).
     
    Through the button "Get WorkItem" I would like to enable the user to call the webservice (which is done in the backround) in the "create phase" for the specific ID he entered.
     
    The missing part in my case is the initial description of this post: I would like to access / read the entered value in the clicked method of the button (even if the record is not saved / written to the DB yet).
  • Suggested answer
    Waed Ayyad Profile Picture
    Waed Ayyad 6,599 Super User 2024 Season 2 on at
    Get the user input value in a grid - value is invalid (not found in the referenced table)
    Hi,
     
    Do you try to enter the value on the grid before it gets created on the related table, you can't do this, since you have a relation between the two tables.
     
    Thanks,
    Waed Ayyad
  • Basti Aurand Profile Picture
    Basti Aurand 115 on at
    Get the user input value in a grid - value is invalid (not found in the referenced table)
    The whole process is a bit more compliated. The Ids in the related table are retrieved via a batch (sometimes long running because of the high volume of records), which queries a REST API. In some cases the user wants to enter a value, which is not yet retrieved from the webservice. Therefore I want to introduce the button to enable the user to directly call the webservice for the single Id, which was entered. So I need the Id, which was entered by the user.
  • Waed Ayyad Profile Picture
    Waed Ayyad 6,599 Super User 2024 Season 2 on at
    Get the user input value in a grid - value is invalid (not found in the referenced table)
    Hi,
     
    I don't understand the question , why you added the button? and what is the usage of it?
     
    Is Work item Id custom field? if yes, and you added the relations of the tables correctly you should get the values without overriding the lookup method. 
     
    Did you try to override the lookup method from to get the values from the referenced table?
     
     

    Thanks,

    Waed Ayyad

    If this helped, please mark it as "Verified" for others facing the same issue

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,784 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,476 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans