
Announcements
Hi
I created a Screen with Form1 and Gellery1
Form 1 has basic information like VoucherNo, Create Date, Amount and Description. Datasource - Commission
Gallery1 is a repeating with fields Salesperson, Commission etc. - Datasource - CommissionDetails - collection
Below is the sample of my submit button. As you can see I was trying to get the DocID and VoucherNo to get a key relationship. This code works on SQL but not on CDS.
On CDS I created two entities Commissions and CommissionDetails thereby Commission is the Main Header for my Form and Gallery respectively.
I need to establish a relationship between these two entities so far it's been unsuccessful. I would appreciate some help.
Patch(Commissions,Defaults(Commissions),
{cr684_amount:Value(DataCardValue7.Text),
cr684_description:DataCardValue5.Text,
cr684_comments:DataCardValue25.Text
});
ForAll(CommissionDetails,Patch('Commission Details',Defaults('Commission Details'),
{cr684_employeeid:EmployeeID,
cr684_salescommission:Commission,
cr684_commissiontype:CommissionType,
cr684_salesrep:SalesPerson,
cr684_description:DataCardValue5.Text,
DocID:'New Voucher'.LastSubmit.'Voucher No'}));
Navigate(Application_Portal,Cover);Navigate('Launch Screen', ScreenTransition.Cover)
Thanks
Dickson
Hi Dickson,
In this document you can see an entity relationships overview.
I hope it helps you.
Javi.