function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
kjs0419kjs0419 

Record update when running flow in a visualforce page

I am able to successfully run my flow and update my record from the flow itself but when I run the flow from my visualforce page (that is accessible to the public) I cannot get the flow to complete - and update the record. I get the "authorization required" page and the record does not update. Any thoughts on what I am doing wrong?

 

I have the most current version activated am 99% sure I have the public access settings for the site configured correctly.

 

My flow is a survey and the record update happens on the campaign record for that specific program. The survey starts with the user entering the date of the program, this generates a list (dynamic choice) of programs with a start date of the date entered on the first screen. The user selects which program they want to survey and then proceed through the survey questions. I then have a summary screen that displays the answers they just provided and when they click "next" it should update the record and take them to the last screen. Instead, I get an error and the record does not update.

 

I have the following filter on the record update:

 

Update CAMPAIGN that meet the following criteria: ID equals varProgramID. (varProgramID pulls the campaign record ID from the program that is selected from the dynamic choice-generated list).

 

Any insights would be greatly appreciated!

RajaramRajaram

In general you should verify the CRUD and FLS settings for any data updates in flow.

However, I believe there is a limitation of updating Campaigns through  a public unauthenticated Site. I would work with support on this. I can check internally, but I believe that is the limitation.

kjs0419kjs0419

Very helpful - thanks!

 

If I pulled the survey fields out of the Campaign object and created a custom object to hold those fields....I could update with the flow...?

jkucerajkucera

It sounds like you are using Sites to expose a visualforce page that uses flow to do some updates on Campaign, but having problems getting the updates to work.  Is that right?

 

Sites that are used to make VF pages public run in the context of the guest users permission.  To update Campaign, that guest user needs to have Edit on Campaigns.  

 

If you are trying to add Campaign Members as well, that user would need to have the Marketing User checkbox checked as well, which may not be possible.

kjs0419kjs0419

Yes - that is exactly what I am trying to do! I did edit the guest user profile to edit pretty much all the campaign fields - in a moment of desperation...and I am still unable to get the flow to update the campaign record. The flow does not involve campaign members at all and I have made sure that the guest user profile has access to the specific record type applicable for this update.

 

I really appreciate the ideas/suggestions.

 

--Kim