Using gotoSlide function in Veeva CRM iRep
Asked Answered
T

1

5

I use Adobe Edge to create sites. I need to use buttons and veeva:gotoSlide function to navigate through slides but buttons are not responding. I've tried using key message, presentation slide names as parameter but still couldn't figure it out.

My JS code is like this:

(function (symbolName) {
    Symbol.bindElementAction(
        compId,
        symbolName,
        "${next_btn}",
        "click",
        function () {
            document.location = "veeva:gotoSlide(CPS-000000007)";
        }
    );

    //Edge binding end
    Symbol.bindElementAction(
        compId,
        symbolName,
        "${prev_btn}",
        "click",
        function (sym, e) {
            veeva:gotoSlide(001);
        }
    );
})
Trull answered 22/11, 2016 at 7:45 Comment(0)
P
7

In Veeva each slide is associated to a key message, which in turn contains a media file. Each media file is a .zip file and can contain images, video, pdfs, of html pages. Finally, slides are associated to presentations; presentations may have a presentation id.

gotoSlide can be used to jump around slides into presentations and also to jump to slides of other presentations. gotoSlide takes one or two parametes that are:

  • media file, mandatory, which is the name of the file that contains the media (e.g. intro.zip in the example below)
  • presentation id, optional, which is the id of the presentation that contains the media (e.g. myProductBenefits in the example below)

Example

For simplicity, let's assume that each key message is directly associated to a presentation. Let's say that we have three key messages (I'm making up names, just to be clear):

  1. Introduction, that contains the file intro.zip
  2. Benefits, that contains my_benefits.zip
  3. Why switch, that contains whySwitch.zip

key messages 1. and 2. are associated to a presentation called Benfits of myProduct which has presentation_id = myProductBenefits, while 3. is not associated.

It is possible to jump to slides with the following links:

  1. veeva:gotoSlide(intro.zip)
  2. veeva:gotoSlide(my_benefits.zip)
  3. veeva:gotoSlide(intro.zip, myProductBenefits)
  4. veeva:gotoSlide(my_benefits.zip, myProductBenefits)
  5. veeva:gotoSlide(whySwitch.zip, myProductBenefits)

Note that:

  • parameters are NOT quoted (intro.zip and NOT 'intro.zip')
  • the second parameter is optional. If it is not provided, Veeva will only jump to slides that are inside the current presentation (it is NOT possible to jump to veeva:gotoSlide(whySwitch.zip) because Why switch key message is NOT associated with Benfits of myProduct presentation)
  • in Veeva the presentation_id is under migration, even if the presentation was not migrated (it's a little bit misleading)
  • the links works both in Javascript window.location = "veeva:gotoSlide(intro.zip)"; and in HTML <a href="veeva:gotoSlide(intro.zip)">Go to introduction</a>
Pintail answered 26/7, 2017 at 15:0 Comment(5)
Is it possible to add back button just like in browsers back button, which goes to previous slide where it was come from?Gipon
@Gipon - Veeva CRM includes buttons to go back to previous slides by default in their interface.Marry
@LisaCerilli But if you come to a pageA from pageX OR pageY (by clicking an image or link on those pages) Veeva CRM's back button will not take you back to the page where you come from. It just takes you prev. and next page in a sequential order.Gipon
@endo Just tried it on a project now. I started on the first slide, then from the menu clicked on the last slide. The menu gave an arrow that brought be back to the first slide. Then I went to the middle slide. The back button brought me to the last slide, then the first slide. The back button brings you to the slide you were on last, and the next button (which only shows up if you use the back button) brings you to the slide you were on before if you used the back button. It works just like the previous/next in web browsers.Marry
Thank you very much @LisaCerilli I didn't know that it works like that (or it wasn't when I tried) Thanks!Gipon

© 2022 - 2024 — McMap. All rights reserved.