web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Getting error message ...
Power Apps
Unanswered

Getting error message when the power app page is published but there is no error when ran from power app studio

(0) ShareShare
ReportReport
Posted on by 36

Hi All,

    I have a power app page where I have the following code

 

If(
 IsError(
 CustomerConnectorFunc.SaveSyncConfig(
 {
 code: LookUp(
 'Environment Variable Values',
 'Environment Variable Definition'.'Display Name' = "Save Sync Config Function Key"
 ).Value,
 partitionKey: "US",
 ClientId: tbx_ClientId.Value,
 ClientSecret: tbx_ClientSecret.Value,
 CRMUrl: tbx_CrmUrl.Value,
 WebApi: tbx_WebAPIUrl.Value,
 WebAPIUrl: tbx_WebAPIUrl.Value,
 OrganizationId: tbx_OrgId.Value,
 TenantId: tbx_TenantId.Value
 }
 )
 ),
 Notify(
 "Error while saving the details to Service.Please try again later.",
 Error
 ),
 Notify(
 "Details saved successfully!",
 Success
 )
 )

 

Here, the CustomConnectorFunc is a custom connector that calls an Azure Function. The Azure function returns HTTP status ok on success otherwise a 500 Error status. When I am running this page from power app studio and I hit the save button, the function executes appropriately giving a success message. When I run this page from the published app in the same environment, this gives the error message shown in the above code. But at the same time the API call is successful as I can see the azure function is returning an HTTP status ok. I tried adding application insight to the page - but that did not show any error. Any help would be appreciated. 

Categories:
I have the same question (0)
  • Tiklu Ganguly Profile Picture
    36 on at

    So in simple, when I am running the code by pressing the play button from the power apps studio the application is running as expected and not going to an error condition in the IsError formula. But when the app is published and running in the same environment, it goes to the error condition. 

     

  • Verified answer
    Tiklu Ganguly Profile Picture
    36 on at

    Ok, apparently the code was behaving this oddly as it is expected from the custom connector to either return a boolean value or a JSON object. Now my function was doing none of those. Once I changed the function the problem went away

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.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard