I was trying to filter the records in line based on the field value in header , but i am not getting the desired output , please anyone help me on this .
my code is below .
i have debugged the code not getting the record , please suggest hoe can i get the header record .
to filter the records in grid based on the field value in header
Hi Dinesh,
You mentioned in another thread that my answers helped. So please don't forget to verify the answers that helped. And if you are facing an issue with verifying, then please mention the answers and moderators will verify it for you.
to filter the records in grid based on the field value in header
Can you show us your form design? Because you are saying you need to filter lines record based on header warehouse ID. In that case you can simply put a relation between header and line. But why do you require some custom code to do this? Can you give us your full business requirement?
and as the blog showed, if the header can be modified then you need to add code there as well
Thanks,
Layan Jweihan Please mark this answer as "Verified" if it solved your issue. In order to help others who will face a similar issue in the future
to filter the records in grid based on the field value in header
Location id is warehouse in header , the data is get into the form unsing insert method i so i want to filter the lines tab using location ie warehouse which are common but i cant use join here , so i have removed joined form data source from lines so all the lines are getting displayed . yes dmc header is first datasource in form , but still i am getting null values i am unable to upply filter on form can you help me on this please .
to filter the records in grid based on the field value in header
Hi Dinesh,
What is LocationId? is it a defined variable or an existing field on the form?
Just to understand if you are trying to set the LocationId field when the form is first open from the lines?
if it was an actual field, why do u need element.args().record() in the first place? why not fill LocationId directly? isn't DTDMCHeader the first datasource in the form?
to filter the records in grid based on the field value in header
when i open the from for specific header record it should show the record only with warehouse in header ,now i am getting all the warehouse in lines , an in debugger i am getting the null values .
to filter the records in grid based on the field value in header
Hi Dinesh,
What header record you are not getting? which line of code are you referring to? as I don't understand.
Do you mean LocationId is empty or what?
Also can you please take a screenshot of the form, showing the header field and grid?
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.