Uploaded Content That Can Be Referenced in a Visualforce Page

Using on Classic with a Visualforce Page WITHOUT an Noon Controller (Admin Friendly version)

This commodity demonstrates how to brand use of:

  1. The SharinPix Visualforce Component
  2. The SharinPix Sheet App

to display a SharinPix album inside the Salesforce Classic Experience without the use of an Noon Controller.

Annotation:

Since Canvas apps take some limitations such equally limited number of calls within 24-60 minutes, we strongly recommend the usage of the SharinPix Visualforce Componentover the SharinPix Canvas App for implementations. The SharinPix Canvas App tin can still be used for testing purposes however.

For more than information about Canvas app limitations, delight refer to the following link:

https://developer.salesforce.com/docs/atlas.en-us.platform_connect.meta/platform_connect/canvas_framework_limits.htm

SharinPix Visualforce Component

Hither's how to reference the SharinPix Visualforce Componentinside a Visualforce Page as well equally defining the SharinPix Abilitiesinline without the utilize of an Noon Controller. Rather than using an Apex course controller, the values will be referenced inline.

  • In Classic: Setup
  • Type Visualforce Pages into the QuickFind in the left cavalcade.
  • Click on Visualforce Pages
  • Click New

  • Enter a namefor your Visualforce Page. In this example, we chosen it SharinPixVisualforceComponent.
  • Bank check the box to specify where you lot want this VF Folio to be seen.

  • The Visualforce Folio implemented in the current example is intended to be displayed on the page-layout of the Account object, however if you want to display it on another object, you lot will demand, to assign the right object to the Standard Controller of the Visualforce Page.
                <apex:folio                StandardController=                "Account"                >                </apex:page>              

To reference the SharinPix Visualforce Component inside the Visualforce Page, we will utilise the code snippet below.

  • Paste it into the Visualforce Markup window on your new Visualforce Page.
  • Click Salve.
                <noon:page                StandardController=                "Account"                >                <sharinpix:SharinPix                superlative=                "600px"                parameters=                "{'Id': '{!CASESAFEID($CurrentPage.parameters.Id)}', 'abilities':{'{!CASESAFEID($CurrentPage.parameters.Id)}':{'Access': {'image_upload':true,'image_list':true,'see':true,'image_delete':truthful}}}}"                ></sharinpix:SharinPix>                </apex:page>              

The SharinPix Visualforce Component possesses the following attributes:

  • pinnacle:refers to the Acme of the SharinPix Anthologyin pixel units. In the nowadays example, the height used is 600px.
  • parameters:refers to the set of SharinPix Abilities enabled or disabled upon the SharinPix Album.

The following code refers to a merge-field that retrieves the current Id of the tape to which the Visualforce Page is added.

                {!$CurrentPage.parameters.Id}              

The next remaining step is to add the Visualforce Folio to the page-layout of the Account object:

  • Go to any record of Type Business relationship.Click onEdit Layout.

Inside the Folio Layout Editor,click on the Visualforce Pages item.

Elevate and Drop the SharinPixVisualforceComponentpage onto the desired surface area of the page-layout. Optionally, you lot tin create a section where you tin can drop the visualforce page.

As it tin exist seen in the screenshot below, the SharinPixVisualforceComponent folio has been added to the department SharinPixof the Page-Layout.

Tip:

The SharinPix Visualforce component can be modified in such a way to only display an upload button.

For such implementation, refer to the commodity that follows:

Implement a SharinPix upload push button in a Visualforce page

SharinPix Canvas App

The present section will lay out the steps on how to reference the SharinPix Canvas Appinside a Visualforce Page as well as defining the SharinPix Abilitiesinline without the utilize of an Apex Controller.

To know more about SharinPix Abilities, refer to the post-obit article: SharinPix abilities

  • In Classic: Setup
  • Type Visualforce Pages into the QuickFind in the left cavalcade.
  • Click on Visualforce Pages
  • Click New

Create the Visualforce Page

  • Enter a proper namefor your Visualforce Page. In this example, we called information technology SharinPixVisualforceComponent.
  • Cheque the box to specify where you want this VF Folio to exist seen.
  • Save

  • Paste the code below inside the Visualforce Folio.
                <apex:page                standardController=                "Account"                >                <apex:canvasApp                developerName=                "Albums"                namespacePrefix=                "sharinpix"                height=                "500px"                parameters=                "{                                  'Id': '{!$CurrentPage.parameters.Id}',                                  abilities:{                                  '{!CASESAFEID($CurrentPage.Parameters.Id)}':                                  {                                                  Access: {                                  image_upload:true,                                  image_list:true,                                  see:true,                                  image_delete:false                                  }                                  }                                  }                                  }"                width=                "100%"                />                </apex:page>              

The post-obit parameters are used within the SharinPix Sheet App:

  • developerName (value: Albums)
  • namespacePrefix (value: sharinpix)
  • peak (recommended value: 500px)
  • parameters
  • width (value: 100%)

The value for the parametersparameter contains:

  • The Anthology Id
  • The list of abilitiesallowed on the SharinPix Anthology.

Anthology Id

The Album Idcorresponds to the record Id of the record within which the Visualforce Page is present. This value is passed through the formula office CASESAFEID() whichmakes sure than the value corresponds to a 18-character record Id.

'{!CASESAFEID($CurrentPage.Parameters.Id)}'              

CASESAFEID() is a formula function  that replaces the 15 character ID (case sensitive) with a 18 character ID (example insensitive).

SharinPix Abilities

The abilitiesimmune on the SharinPix tin can be defined as shown in the code snippet below.

                Access:                {                image_upload:                true,                image_list:                true,                see:                true,                image_delete:                faux                }              

The parametersvariable is so referenced inside the Visualforce Page through the parameter parameters as shown in the code snippet below.

                <apex:page>                <noon:canvasApp                developerName=                "Albums"                namespacePrefix=                "SharinPix"                parameters=                "{! parameters }"                />                </noon:page>              

In one case you complete the necessary steps above, you will be able to add the Visualforce Page to the page-layout of a corresponding record.

Calculation Canvas App to Page-Layout

  • Go to any tape of Type Account.Click on the Quick Access Menu

  • Click on Edit Layout.
  • Within the Page Layout Editor,click on the Visualforce Pages item.

  • Drag and Drop the Visualforcepage created in the steps above onto the desired area of the page-layout. Optionally, y'all can create a department where yous tin can drop the Visualforce Page.
  • Salve.

In the screenshot below, the SharinPix Anthology is displayed where the Visualforce Page has been added.

Inline Visualforce folio example with nearly all parameters

Find below a quick example of near all parameters included:

                <noon:page StandardController="Account"> <sharinpix:SharinPix height="500px" parameters="{'abilities':{'{! CASESAFEID($currentPage.parameters.Id) }':{'Access':{'see':true,'image_list':true,'image_upload':true,'image_delete':true,'fullscreen':true,'image_caption':true,'image_tag':truthful,'image_copy':true,'paste':truthful,'share':truthful,'image_duplicate':true,'image_annotate':truthful,'image_rotate':true,'image_crop':true,'image_download':true},'Tags':{'Before':{'en':'Earlier'},'After':{'en':'Later on'}},'Display':{'filename':true,'tags':true,'group_pdf':true,'confirm_delete':true,'annotation_toggle':truthful,'add_tag_first':true}},'tags':{'read':true,'create':true,'filter_any_of':truthful}},'Id':'{! CASESAFEID($currentPage.parameters.Id) }'}"></sharinpix:SharinPix> </apex:page>              

Please annotation that you can rely on the SharinPix Permission object to generate about of this lawmaking by merely betoken and click. And then use the place/proper noun/value generated to insert into your Visualforce code page or even your noon code.

Check information technology out here: SharinPix Permission Object

longandurn53.blogspot.com

Source: https://docs.sharinpix.com/m/documentation/l/874400-using-on-classic-with-a-visualforce-page-without-an-apex-controller-admin-friendly-version

0 Response to "Uploaded Content That Can Be Referenced in a Visualforce Page"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel