Solved! Go to Solution.
I ended up using Flow to do 2 inserts one after another.
After quite of bit of searching I found the Patch or Collect may the way to meet this requirement.
However, 'Bank Account Disbursement' has 3 required fields, 2 of them are lookup fields to other entities.
Found it hard to referennce the fields correctly. Tried the code like below and PowerApps keeps saying field name is invalid:
SubmitForm(Form1);Patch('Bank Account Disbursements',Defaults('Bank Account Disbursements'), {cdm_bankaccountdisbursementnumber:"XXXXXXX",cdm_workerbankaccountnumber:AccountNumberValue.Text,cdm_companycode:LookUp(Companies,cdm_companycode="MA")});ResetForm(Form1)
There is a blog here talking about using Patch to create records: https://sachinbansal.blog/2018/06/04/common-data-service-for-apps-canvas-app-update-patch-lookup-val..., I followed the exact method and it didn't work.
I ended up using Flow to do 2 inserts one after another.
User | Count |
---|---|
224 | |
100 | |
96 | |
57 | |
31 |
User | Count |
---|---|
283 | |
114 | |
110 | |
63 | |
59 |