Asked by:
Populate field on form using lookup to another entity, while adding through sub-grid

Question
-
I have an Invoice entity which has it's line entity in a sub-grid. There is a product look up field in that line. When I add this line entity through sub-grid from the Invoice entity, I want to fetch one field value from product entity and set it to the invoice line entity.How do I do this? Please help me.Friday, August 18, 2017 6:37 AM
All replies
-
Hello,
You should use webservices for that purpose - https://msdn.microsoft.com/en-us/library/gg334767.aspx
Following tool can make your life easier during development of code for that - https://github.com/jlattimer/CRMRESTBuilder/releases
Dynamics CRM/Business Solutions MVP
Read My blog- Proposed as answer by Andrii ButenkoMVP, Moderator Friday, August 18, 2017 1:32 PM
Friday, August 18, 2017 1:32 PMModerator -
As Product is parent of Invoiceline therefore you can use synchronous workflow to meet your requirement.Monday, August 21, 2017 9:09 AM
-
Hi Andrew,
Thanks for your response. But I want to know if I can do this using Javascript?Thursday, August 24, 2017 6:05 AM -
Use editable sub grid. And add javascript their.
Hope this helps. ----------------------------------------------------------------------- Santosh Bhagat If this post answers your question, please click "Mark As Answer" on the post and "Vote as Helpful"
- Proposed as answer by Mr. Santosh Bhagat Thursday, August 24, 2017 9:07 AM
Thursday, August 24, 2017 9:07 AM -
Hi Santosh,
One problem I am facing is that in editable subgrid I can select only tablet and phone but I can't select Web.
I want to use Javascript when I am adding data in sub grid. Is this possible?
Friday, August 25, 2017 7:12 AM