• SundayAdmin
  • NEWBIE
  • 0 Points
  • Member since 2012

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 3
    Questions
  • 2
    Replies

Hi,

 

I'm struggling to create a VF page that can prevent a delete based on a conditional, in this case prevent a Custom Object Record Delete  of a the Custom Child Object: "Solution__c", only if the formula field "Delete" equals value B and not when it equals value A.

 

Here is the code I have up until now which works to prevent deletions for everyone except Sys Admins. However I would like to know how I could extend/change this code to allow the VF page to prevent deletions based on a field value instead of a global variable like the one for Profile as this is just a temporary measure:

 

<apex:page standardController="Solution__c" action="{!if($Profile.Name != 'System Administrator',
    null,
    urlFor($Action.Solution__c.Delete, $CurrentPage.Parameters.id, [retURL='/006'], true)
    )
    }">
    
     <apex:pageBlock >
        <apex:PageMessage summary="You are not allowed to delete Solutions if the related Opportunity has been set to the status Handover, Closed Lost or Closed Won"
            severity="Warning"
            strength="3"/>
        <apex:pageMessages />
    </apex:pageBlock>
    
</apex:page>

 

All help is appreciatted

 

Thanks and Kind Regards,

SundayAdmin

HI,

 

I would like to find out how I could make a flow end at a custom location, more specifically make it end at the place where it was started/clicked, which is a VF page within a button on a record detail page.

 

Here is the VF page that I've created, I only need it to end at the Contact Id page where it was clicked (the flow already has a variable with the Contact Id called ContactID.

 

All help is much appreciatted!

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>

Hi,

 

I'm quite new to VF and I'm trying to get a button to open a VF page that I made into a new tab in the browser. The button resides on the Account Detail page and the VF page is setup this way:

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>

 

Any help is much apprecaitted, as I want to apply the same concept to other buttons/VF pages.

 

Thanks!

 

HI,

 

I would like to find out how I could make a flow end at a custom location, more specifically make it end at the place where it was started/clicked, which is a VF page within a button on a record detail page.

 

Here is the VF page that I've created, I only need it to end at the Contact Id page where it was clicked (the flow already has a variable with the Contact Id called ContactID.

 

All help is much appreciatted!

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>

Hi,

 

I'm quite new to VF and I'm trying to get a button to open a VF page that I made into a new tab in the browser. The button resides on the Account Detail page and the VF page is setup this way:

 

<apex:page standardController="Account" tabStyle="Account">

    <flow:interview name="Flow_Testing" finishLocation="{!URLFOR('/003/o')}">
        <apex:param name="AccountID" value="{!account.Id}"/>
        <apex:param name="UserID" value="{!$User.Id}"/>
    </flow:interview>
    
</apex:page>

 

Any help is much apprecaitted, as I want to apply the same concept to other buttons/VF pages.

 

Thanks!