Announcements
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-value-edit-form-does-not-update-lookup-value-on-submit-by-default-use-of-patch-function-part-6/, I followed the exact method and it didn't work.
I ended up using Flow to do 2 inserts one after another.
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.
Congratulations to our community stars!
Expanding mentorship, skilling, and AI innovation
These are the community rock stars!
Stay up to date on forum activity by subscribing.
11manish 342 Super User 2026 Season 2
M Bilal Khan 271
Mohsin Ali 223