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
Peter Martensen 8Peter Martensen 8 

I need debugging a VF page that starts a Flow

I wrote a Flow that works to update a field in a custom Object (Sample_Submission_Form__C, I think.  Maybe it's just Sample Submission Form).  I followed instructions I found on a website that showed how to invoke a Flow through a VF page.  The VF page already creates a pdf, and I added this code to the bottom of it.  But I'm getting an error: "
Error: The element type "s" must be terminated by the matching end-tag "</s>"."   Also, the Flow name is shown below, but the URL is just "UpdateSSFstatusToSubmitted".  Can someone tell me how to fix it?  Thanks
<standardController="Sample_Submission_Form__c">
<flow:interview name="UpdateSSFstatusToSubmitted_v3"/>
    <apex:param name="Sample_Submission_Form__c.ID" value="{!Sample_Submission_Form__c.ID}"/>
</flow:interview>

</apex:page>

 
Best Answer chosen by Peter Martensen 8
Alain CabonAlain Cabon
VFP are XML-like files but there are some rules for the Visualforce pages that are different :
  • VFP Tags are not Case Sensitive.
  • There is not a VFP prolog like the XML Prolog.
Otherwise all the other rules are the same as written below for a well-formed XML file:
https://www.w3schools.com/xml/xml_syntax.asp

<flow:interview name="UpdateSSFstatusToSubmitted_v3" >  : was also wrong at the end ( I missed it )
 
<apex:page standardController="Sample_Submission_Form__c">
<flow:interview name="UpdateSSFstatusToSubmitted_v3" >
    <apex:param name="Sample_Submission_Form__c" value="{!Sample_Submission_Form__c}"/>
</flow:interview>
</apex:page>

With a standardController, it is more easy to put then complete object (here Sample_Submission_Form__c as an input param of the flow)
 

All Answers

Alain CabonAlain Cabon
Hi,

<standardController="Sample_Submission_Form__c">

You always need <apex:page  at the beginning of a Visualforce page.
 
<apex:page standardController="Sample_Submission_Form__c">
<flow:interview name="UpdateSSFstatusToSubmitted_v3"/>
    <apex:param name="Sample_Submission_Form__c.ID" value="{!Sample_Submission_Form__c.ID}"/>
</flow:interview>
</apex:page>

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/apex_pages_standardcontroller.htm
 
Peter Martensen 8Peter Martensen 8
There's one at the beginning of the VF page.  Do I need another?
Alain CabonAlain Cabon
VFP are XML-like files but there are some rules for the Visualforce pages that are different :
  • VFP Tags are not Case Sensitive.
  • There is not a VFP prolog like the XML Prolog.
Otherwise all the other rules are the same as written below for a well-formed XML file:
https://www.w3schools.com/xml/xml_syntax.asp

<flow:interview name="UpdateSSFstatusToSubmitted_v3" >  : was also wrong at the end ( I missed it )
 
<apex:page standardController="Sample_Submission_Form__c">
<flow:interview name="UpdateSSFstatusToSubmitted_v3" >
    <apex:param name="Sample_Submission_Form__c" value="{!Sample_Submission_Form__c}"/>
</flow:interview>
</apex:page>

With a standardController, it is more easy to put then complete object (here Sample_Submission_Form__c as an input param of the flow)
 
This was selected as the best answer
Alain CabonAlain Cabon
With a standardController, it is more easy to put the complete object (typo)
Peter Martensen 8Peter Martensen 8
Alain,
Thanks1  I got it to work.
 

 

 
Alain CabonAlain Cabon
Peter,

By the way,  <apex:page> is the "root" node so it is unique (particular node). 

But you can have several <apex:form> for the same page for example.

If your question is solved and you don't need further clarification, you could mark an answer as a best answer.

Alain