cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Akbulut
Frequent Visitor

Create CRM Record by using PowerApps APP

 

Hi,

 

I can create CRM record by using PowerApps screen.I fill entity fields from my PowerApps APP but when I clicked button(Save Record to CRM with Flow) if one of entity fields does not contains data,give error and cant save CRM.If all of entity fields arent blank,I can create new CRM record by using APP.How can I add condition to create CRM record even though one of entity fields does not contains data?

 

Is there anyone who can help me about this matter?

 

Thanks a lot

 

3 REPLIES 3
Community Support
Community Support

Re: Create CRM Record by using PowerApps APP

Hi @Akbulut,

 

Could you please share a screenshot about your app's configuration?

Could you please show more details about the error message?

Do you pass form data from your app to a flow, and then create a record within your Dynamics 365 CRM using flow?

Further, is the field that you mentioned a required (Mandatory) field within your Dynamics 365 entity?

 

If the field that you mentioned is a required (Mandatory) field within your Dynamics 365 entity, you must provided a value for this field within your app. In other words, if you don't provided a value for this required (Mandatory) field, you could not create a record within your D365 entity.

 

As an alternative solution, you could consider take a try to set a default value for this field within the Edit form of your app. If you provide a value for this field, this field would use the value that you provided, if you don't provide a value for this field, this field would use the default value.

 

I have made a test on my side, please take a try with the following workaround:

 

  • Within the Edit form control of your app, unlock the Data card (DataCard1) which contains the field that you mentioned.
  • Set the Update property of the Data card control to following formula:
If(
IsBlank(DataCardValue13.Text),
"Default Value", /* <-- type a default value for this field */
DataCardValue13.Text
)

Note: The DataCardValue13 represents the Text Input control within the Data card.

 

Then if you want to pass this field value from your app to a flow, you could take a try with the following formula:

'YourFlowName'.Run(
...
DataCard1.Update,
...
)

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Akbulut
Frequent Visitor

Re: Create CRM Record by using PowerApps APP

Hi @v-xida-msft,

 

I shared screenshot APP.

 

When I fill all fields on App, I can create record in dynamics CRM using Flow.(Flow.Run("")).Just one field is mandatory in dynamics crm.(Proje Field).

Other fields are not mandatory in dynamics crm.

For example, When I dont fill Ürün field in App(That field are not mandatory in CRM),It gives error and cant create in CRM.Error like "Flow.Run Error:"Run" ," YenikayıtolusturmaUrun" parameter has invalid value.

 

Best regards,

Akbulut

 

Community Support
Community Support

Re: Create CRM Record by using PowerApps APP

Hi @Akbulut,

 

I have made a test, and the issue is confirmed on my side.

 

Regardless of the field is required (mandatory) or not, if you don't provided a value for this field when you pass parameters from your app to a flow, the Flow.Run function would always return the following error:

Flow Run Failed. The method Run has an invalid value for parameter "xxxxxx"

 

As an alternative solution,  you could consider take a try to set a default value for this field within the Edit form of your app. If you provide a value for this field, this field would use the value that you provided, if you don't provide a value for this field, this field would use the default value.

 

Please take a try with above solution I provided, then check if the issue is solved.

 

In addition, I think it is not necessary to pass parameters from you app to a flow, and then create record using the flow based on the passed parameters. You could achieve your needs just using PowerApps or Microsoft Flow rather than use them together.

 

Best regards,

Kris

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
MBAS Gallery 2020

MBAS Gallery 2020

Watch Microsoft Business Applications Summit sessions on-demand.

firstImage

New Ranks and Rank Icons released on April 21!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power Apps Community!

Power Platform 2020 release wave 1 plan

Power Platform 2020 release wave 1 plan

Features releasing from April 2020 through September 2020

Top Solution Authors
Top Kudoed Authors
Users online (6,711)