Change subgrid view dynamically by Javascript

Hello,
In my current project Client
would like an activities view that shows related activities PLUS some fields from those activities.
Please let me know how to change subgrid view dynamically.
we are trying to get the same results as in the out of the box subgrid where you get the regarding activities but we want some additional fields such as the To from the phone
call activity
I am using below code to achieve this
// JavaScript source code
//Change the Fetch XML and set the subgrid ID
function UpdateSubGrid()
    var SubGrid = document.getElementById("Activities");
    if (SubGrid.readyState != "complete")
        //The subgrid hasn't loaded, wait 1 second and then try again
        setTimeout(UpdateSubGrid, 1000);
        return;
    var fetchXml = "<fetch version='1.0' output-format='xml-platform' mapping='logical' >" +
  "<entity name='activitypointer'>" +
   " <attribute name='subject' />" +
    "<attribute name='ownerid' />" +
    "<attribute name='prioritycode' />" +
    "<attribute name='regardingobjectid' />" +
    "<attribute name='activitytypecode' />" +
    "<attribute name='statecode' />" +
    "<attribute name='scheduledstart' />" +
    "<attribute name='scheduledend' />" +
    "<attribute name='activityid' />" +
    "<attribute name='instancetypecode' />" +
    "<attribute name='community' />" +
    "<order attribute='scheduledend' descending='false' />" +
    "<filter type='and'>" +
    " <condition attribute='isregularactivity' operator='eq' value='1' />" +
    "</filter>" +
    "<link-entity name='phonecall' from='activityid' to='activityid' visible='false' link-type='outer' alias='phonecalllinkage'>" +
    " <attribute name='from' />" +
    " <attribute name='to' />" +
    "</link-entity>" +
    "<link-entity name='task' from='activityid' to='activityid' visible='false' link-type='outer' alias='tasklinkage'>" +
    " <attribute name='percentcomplete' />" +
    "</link-entity>" +
    "</entity>" +
"</fetch>";
   // fetchXml
    //Set Fetch XML
    //Inject the new fetchXml..
    SubGrid.control.SetParameter("fetchXml", fetchXml);
    //Force the subgrid to refresh
    SubGrid.control.refresh();
Many thanks in advance.
Harsha

Hi Pedro,
Thank you for your response.
Actual requirement is Client
would like an activities view that shows related activities PLUS some fields from those activities. I tried out of box this first but it is not achievable because some entities are not available in entities list to select columns.
I want to add coulns from related entity inside grid.
Please let me know how I can achieve this through IFrame, Plugin or ssrs report?
Thanks in advance.
Harsha

Similar Messages

  • Change 3D views with JavaScript code?

    I am looking for a way to change 3D views using JavaScript. I want to obtain similar result as the predefine action (Go to a 3D view) but with code.
    More preciselly, I want to connect items within a list box to different 3D views.
    Any ideas or suggestion would be greatly appreciated.
    Thank you
    Tutorial on how to use the Go to a 3D view action:
    Connecting Document JavaScript to 3D Views (PDF: 2.3M)
    http://partners.adobe.com/public/developer/en/tips/topic_tip3.pdf
    Related topics:
    looking for a way to switch views using Javascript
    http://www.adobeforums.com/cgi-bin/webx/.3bbed722/0
    SMOOTH TRANSITION BETWEEN VIEWS?
    http://www.adobeforums.com/cgi-bin/webx/.3bc0ce56
    Cameras vs. views; views.xml
    http://www.adobeforums.com/cgi-bin/webx/.3bbf0748/3

    hello maybe other have same problem i found a simple solution for me
    use the javascript bridge and juse the f4m manifest files
    function changeSrc(playerdivId,src){
                var player = document.getElementById(playerdivId);
                player.setMediaResourceURL(src);
    src multicast fm4 manifest like this
    http://sourceforge.net/apps/mediawiki/osmf.adobe/index.php?title=Flash_Media_Manifest_(F4M )_File_Format
    best regards

  • SP2010 Bug? Cannot change List View in Ribbon. List view drop down not responding?

    In all of my Libraries I have 3-5 views (standard and custom), I cannot select them from the Ribbon thought, the drop down button does not respond when clicked (nothing happens):
    When going with the mouse over the drop down button it shows "javascript:;" in the IE status bar.
    The only way to change the view, for the moment, is to do it via Library Settings and set the selected view as default.
    Is this a know issue? Is there any settings that I`m missing?
    Many thanks!
    Cheers,
    marek 

    Following is missing in master page, add this and it should work.
    Where to add?? see the appropriate place from V4 master.
    <Sharepoint:UIVersionedContent runat="server" UIVersion="4">
        <ContentTemplate>
         <Sharepoint:SPNavigationManager
         id="TreeViewNavigationManagerV4"
         runat="server"
         ContainedControl="TreeView"
         CssClass="s4-treeView"
         >
           <SharePoint:SPLinkButton runat="server" NavigateUrl="~site/_layouts/viewlsts.aspx" id="idNavLinkSiteHierarchyV4" Text="<%$Resources:wss,treeview_header%>" accesskey="<%$Resources:wss,quiklnch_allcontent_AK%>"
    CssClass="s4-qlheader" />
            <div class="ms-treeviewouter">
           <SharePoint:DelegateControl runat="server" ControlId="TreeViewAndDataSource">
             <Template_Controls>
            <SharePoint:SPHierarchyDataSourceControl
             runat="server"
             id="TreeViewDataSourceV4"
             RootContextObject="Web"
             IncludeDiscussionFolders="true"
            />
            <SharePoint:SPRememberScroll runat="server" id="TreeViewRememberScrollV4" onscroll="javascript:_spRecordScrollPositions(this);" style="overflow: auto;height: 400px;width: 155px; ">
              <Sharepoint:SPTreeView
             id="WebTreeViewV4"
             runat="server"
             ShowLines="false"
             DataSourceId="TreeViewDataSourceV4"
             ExpandDepth="0"
             SelectedNodeStyle-CssClass="ms-tvselected"
             NodeStyle-CssClass="ms-navitem"
             SkipLinkText=""
             NodeIndent="12"
             ExpandImageUrl="/_layouts/images/tvclosed.png"
             ExpandImageUrlRtl="/_layouts/images/tvclosedrtl.png"
             CollapseImageUrl="/_layouts/images/tvopen.png"
             CollapseImageUrlRtl="/_layouts/images/tvopenrtl.png"
             NoExpandImageUrl="/_layouts/images/tvblank.gif"
              >
              </Sharepoint:SPTreeView>
            </Sharepoint:SPRememberScroll>
             </Template_Controls>
           </SharePoint:DelegateControl>
            </div>
         </Sharepoint:SPNavigationManager>
        </ContentTemplate>
       </SharePoint:UIVersionedContent>

  • How to change VO query dynamically

    Hi,
    Iam trying to change the VO query dynamically. My req. is I have 6 columns in a header page 3 columns(default single column) for sorting purpose and another 3 columns(default single column) for data querying purpose.
    al these are in one view so I have created one VO.
    Sorting Searching
    A A
    B B
    C C
    When I give any values in Sorting and hit submit button VO query should change dynamically.
    I have searched older post regarding this.
    My query is some thing like this
    SELECT * from cust_table where a = NVL(:1 ,a)
    UNION
    SELECT * from cust_table where a<> NVL(:1 ,a)
    order by a
    Iam trying to pas the below part dynamicaly in my AM method
    vo.setWherecaluse("where a = NVL(:1 ,a)
    UNION
    SELECT * from cust_table where a<> NVL(:1 ,a)
    order by a ")
    and trying to pass the params to that query. But it is not working.Giving error "Bind variable could not find"
    Can any one suggest how to solve the issue.
    Thanks,
    Mahesh

    Hello Ajay,
    THanks for your response.
    My vo query is select col1,col2,col3,col4,col5,col6 from cust_table;
    and and changing vo.setwhereclause dynamically based on different scenerios.
    in one scenerio i need my query to be some thing like
    SELECT col1,col2,col3,col4,col5,col6 from cust_table where a = NVL(:1 ,a)
    UNION
    SELECT col1,col2,col3,col4,col5,col6 from cust_table where a <> NVL(:1 ,a)
    order by a
    so can i concatenate my vo.setwhereclause like *"where a = NVL(:1 ,a) UNION SELECT col1,col2,col3,col4,col5,col6 from cust_table where a NVL(:2 ,a) order by a"*
    in the setwhereclause iam setting bind variables is this method correct? Hope it is clear pleaselet me know if it is not clear I will explain in detail.
    Thanks,

  • PCUI: Changing screen structure dynamically

    How to change screen structure dynamically, i.e based on the input need to display details of corresponding structure.

    Hi Arun ,
    I am not too sure what your question means .If you want to change fields dynamically then screen-variants are
    a good way to do it.
    If you want to change the entire structure itself for the same ROLE then you can try a viewswitch which combines several tab pages .
    More details about this is available ib the PCUI cookbook.
    (Implementing People-Centric User Interfaces with Business Server Pages and SAP Enterprise Portal).
    An extract is given below -
    To minimize the number of tabstrips, a so-called viewswitch is offered. This means that within one tab, multiple views are available and can be selected from a dropdown list in the toolbar. This viewswitch works in the same way as the tabs on a lower level. A viewswitch should be used for similar content, for example: Instead of using the three tabs Competitor Address, Competitor Products and Competitor Strategy, they can be combined to one viewswitch OPP_Competitor with the fields address, products, and strategy in the dropdown list box in the toolbar. The dropdown list box only appears if the viewswitch tab is active. To build a viewswitch, several tabs have to be combined to a viewswitch group.
    Regards,
    Satyadeep

  • I can't change the view from player view to grid view in youtube

    i have a problem with youtube, i can't change the view from player view to grid view on channels that i visit, and that just happen with firefox, it dosent happen with explorer, so what can i do please?
    == This happened ==
    Not sure how often

    it didn't unfortunately, and i think that the problem in the JavaScript , Because when I click on the grid view icon i see on the bottom of the page "JavaScript" see the image:

  • Please change the view in the top sites, the 6.1 upgrade has reverted back to a plane two dimensional view, which is a little plain. Can I revert back to an older version via my time capsule save?

    Please change the view in the top sites, the 6.1 upgrade has reverted back to a plain two-dimensional view, which is a little dated. Can I revert back to an older version via my time capsule save? C'mon Apple upgrades supposed to leap into the future not the past. :-(

    Please change the view in the top sites, the 6.1 upgrade has reverted back to a plain two-dimensional view, which is a little dated. Can I revert back to an older version via my time capsule save? C'mon Apple upgrades supposed to leap into the future not the past. :-(

  • How to populate list in tree view  dynamically

    Hi,
    I am new to  Indesign Plugin creation.
    I want to create list in tree view dynamically.
    I tried wlistboxcomposite sdk sample in indesign cs4.
    I have some doubts in this.
    1. Can i write my own method in  WLBCmpTreeViewAdapter class because it's implements ListTreeViewAdapter
    If it's possible how can i call this method.
    2. In this example they populating static string in constructor like this
    WLBCmpTreeViewAdapter::WLBCmpTreeViewAdapter(IPMUnknown* boss):ListTreeViewAdapter(boss){
    K2Vector<PMString> lists;
    for (int32 i = 0; i< 12; i++){PMString name(kWLBCmpItemBaseKey);name.AppendNumber(i+1);name.Translate();lists.push_back(name);}
    InterfacePtr<IStringListData> iListData(this, IID_ISTRINGLISTDATA);}
    and this list is populating on loading time but my requirement is i have one button "get list" after clicking this button i have to populate the list, how can
    i achieve this.
    Pls do needful.
    Thanks
    Arun

    The TreeViewAdaptor is responsible for mapping your custom data to the tree view itself.  I almost always start by making it return some fixed number of objects with names "item 1" etc. That way you get the tree view working first.
    Then, after you get it laid out and displaying properly, you can worry about using real data.  At that point, you have your adaptor return the actual number of items in your list and each individual item.  Then you can populate your list when you push your button and then invalidate the IControlView of the tree view widget to cause it to redraw.  At that point your adaptor will get called and your data should appear.
    Jon
    "Expert for hire"

  • Views for list web parts. Is there a way to allow users to change the view for a list web part without being redirected?

    Hi,
    I added a list view web part into a SharePoint 2013 page and it  is working as expected, except for one thing.
    I have enabled the option for the user to change the view for the web part. However when the user changes it, the user is redirected away from the page containing the web part, to the URL of the list itself.
    Is there a way to circumvent this issue so when the user selects a different view it updates the listing in the web part itself, rather than the user being redirected?
    Thanks in advance for the help.
    Regards,
    P.

    Hi,
    Please understand that one page can only display one view. You could find it out by observing the Address in browser when switching among different views for a list.
    If you would like to change the view of a list web part, you could go to web part propertites > Select view and configure it.
    In addition, here is a thread with similar requirement that might help:
    http://social.technet.microsoft.com/Forums/en-US/18dba190-5ee2-4b50-b005-1360d862f4ba/how-can-end-user-change-the-view-in-a-list-view-web-part?forum=sharepointgeneralprevious
    Regards,
    Rebecca Tu
    TechNet Community Support

  • How to calculate the Percent change in a dynamic

    hi All,
    I'm trying to get the percent increase/change of two dynamic
    colums.  In my report, the user has a checkbox where he can select two colums to calculate the percent growth.
    My DataSet is PilarName, Calification(is a decimal value) and Period (this is a string).  I created the Matrix this way:
    PilarName [Period]
    [PilarName] [Calification]
    Which give me these values:
    So, now I need to create another column to calculate the percentage change between these two colums.  I tried this:
    I added a Adjacent column group for Period column and I grouped by the calculated column "ColumnDiff".  Add the following expression.
    =(SUM(Fields!Calificacion.Value)- Previous(SUM(Fields!Calificacion.Value),"ColumnDiff"))/Previous(SUM(Fields!Calificacion.Value),"ColumnDiff")
    After that I get: 
    I'm getting the sum of the two columns instead.
    Any clue about what I'm doing wrong? Please help me, I've been looking for the answer but any solution works for me.
    Luis Carlos

    Hi Luis,
    According to your description, you have a report with different dynamic columns. Now what you want is show your user percentage growth in your matrix report after your user select two of those columns (I think you may use parameter to achieve your “checkbox”
    function). Is my understanding correct?
    In Reporting Service, we can’t calculate dynamic columns with our build-in arrogation functions. So we need to add custom code into our report, and call those functions which defined in custom code in our expression. We have tested your scenario in our local
    environment. Here are steps and screenshots for your reference.
    Go to your Report Properties, add the custom code below into your report:
    Dim Shared Num1 As Double
    Dim shared Num2 As Double
    Public Function GetCalification(Calification as Double,Type as String,Type2 as String) 
    If Type = Type2 Then
       Num1=Calification
    Else
       Num2=Calification
    End If 
    Return Calification 
    End Function
    Public Function GetPec()
    Return (Num2-Num1)/Num1
    End function
    Create a matrix. Put PilarName into Row field, put Period into Column field. In Data field, put the expression below into the textbox:
    =Code.GetCalification(Fields!Calification.Value,Fields!Period.Value,Parameters!Period.Value(0))
    In our sample report, we created a parameter (named Period) for selecting two columns. You can replace “Parameters!Period.Value(0)” with your own parameter.
    Add an outside column at right (%Growth), put the expression below into the textbox:
    =Code.GetPec()
    Save and preview. The matrix and result looks like below:
    Reference:
    Custom Code and Assembly References in Expressions in Report Designer (SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to change the view criteria at run time for af:query

    Hi,
    I've a usecase where I need to change the view criteria of the af:query at run time.
    Use case:
    =======
    1) Consider a check box (Show Emps Under Dept 10) in the query panel when user selects and clicks 'Search' button should show the employees under dept 10. If user searches without selecting the check box, the results should show all the employees in all the departments.
    2) I need to have a check box always in the query panel. Its mandatory.
    The way I implemented:
    ==============
    1) Created a transient variable 'Show Emps Under Dept 10' in the EmployeeVO and also created a bind variable bind_DeptNo.
    2) Create a view criteria 'AllEmployees' which has only the transient attribute as the view criteria item and whose value set to 'false' by default.
    3) Created another view criteria 'EmpUnderDept' which has 'DepartmentId' as the view criteria item and whose value set to the bind variable 'bind_DeptNo'.
    4) Dropped the view criteria 'EmpUnderDept' as the 'af:query' panel in the jspx page.
    5) Overridden the queryListener as '#{EmpBean.empSearch}'
    6) Has the below code in the empSearch method as below. When user selects the check box, applying the other criteria 'EmpUnderDept' and setting the bind variable to '10'.
    public void empSearch(QueryEvent queryEvent) {
    // Add event code here...
    QueryDescriptor queryDesc = (QueryDescriptor) queryEvent.getDescriptor();
    ConjunctionCriterion conCrit = queryDesc.getConjunctionCriterion();
    List<Criterion> criterionList = conCrit.getCriterionList();
    List criterionValues = new ArrayList();
    Object criteriaValue = null;
    int criteriaNo = 0;
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    for (Criterion criterion : criterionList) {
    AttributeDescriptor attrDescriptor = ((AttributeCriterion)criterion).getAttribute();
    System.out.println("============== attrDescriptor.getName() =================== " + attrDescriptor.getName());
    criteriaValue = ((AttributeCriterion)criterion).getValues().get(0);
    if(criteriaNo==0) {
    Boolean val = (Boolean) ((AttributeCriterion)criterion).getValues().get(0);
    if (val.equals(true)) {
    OperationBinding method = (OperationBinding) ADFUtil.findOperation("ExecuteWithParams");
    if(method!=null) {
    Map params = method.getParamsMap();
    //params.put(key, value)
    method.getParamsMap().put("bind_DeptId", 10L);
    method.execute();
    ADFUtil.invokeMethodExpression( "#{bindings.EmpUnderDeptCriteiaQuery.processQuery}", queryEvent);
    } else {
    //ADFUtil.invokeEL("#{bindings.ExecuteWithParams.execute}");
    ADFUtil.invokeMethodExpression( "#{bindings.AllEmployeesCriteriaQuery.processQuery}", queryEvent);
    But this approach is not working and its always showing all the employees in all the departments.
    Please let me know if there is a way to change the view criteria at run time depending on the values set at run time for one of the view criteria items.
    JDev version am using is '11.1.1.5'
    Thanks,
    Lakshman

    Hi Shay,
    It worked for me without overriding the executeQuery() method in the ViewImpl.java.
    Instead of creating 2 view criteria, I created only one which has both transient variable and the DepartmentId = <bind_DeptId>. With the above code, it worked properly. Now I am using only one view criteria.
    Thank you.

  • How can I batch change the view options of multiple playlists?

    I would like to select multiple playlists and batch change their view options; seems like an obvious feature that should be there, but it does not seem to be there. I know of Assimilate View Options v2.2 in Doug's AppleScripts, but this is not what I want, since AWO requires you to do the change playlist by playlist, i.e., not in batch mode (and I have hundreds of playlists ...). Any idea? Please answer privately at [email protected] since I do not read this forum regularly. Thanks in advance for your help!

    did you also check out the following script ?
    [_*Change Hidden iTunes Preferences v2.4*_|http://dougscripts.com/itunes/scripts/ss.php?sp=changehiddenprefs]
    This application will allow you to invoke hidden iTunes preferences:
    Show "Library" playlist
    *Changing view setting is global*
    Allow half-stars in ratings
    Hide "Ping" buttons
    Show/hide arrow links -- to either search the iTunes Store or search your library
    Load complete iTunes Store preview before playing
    Create playlists for purchased song collections
    Play songs while importing or converting
    Create file names with track number
    Maintain grid view for Search results
    Option-click zoom button for Mini Player
    Show buttons horizontally

  • Can you change the view of album covers when playing music on Apple TV?

    I love the coverflow view when playing tracks on my mac. Its what I always wanted to be able to see the album cover as large as the screen while the song plays.
    However on Apple Tv its "not quite" the same!
    I feel that the text is too big (taking up half the screen) and although the album cover takes up the other half, the text and album cover keep switching sides of the screen every 10 seconds or so which i find a little annoying! Does anyone else find this annoying or just me?
    Of course I love my mac and apple TV however i cant find a way to change this view when music is playing. I would like coverflow on apple Tv just like on mac. A full screen showing the album cover, with smaller text to show artist and track and not to switch sides of the screen!
    Does anyone know what im banging on about and can you help!

    Oh dear! but thank you for a quick reply and your kind welcome!
    I thought the side to side motion would be to protect the screen somehow but i dont really like it!
    Not at all relaxing when playing a soothing song to see the graphics flipping back and forth.
    Its great technology, amazing, but could this viewing option be changed somehow by the wizards at apple.
    I might need to hit the off button on Tv and just listen on speakers otherwise.

  • When I open ical, the calendar looks like an old desk pad vs what is in the manual.  How do I change the view (not month, day, week), but the background presentation?

    When I open ical, the calendar looks like an old desk pad vs what is shown in the manual or on-line tutorials.  How do I change the view (i.e. background) not the month/day/week view but the background template?  The default in the manual is good.  Software is current - Lion. 

    Kelly,
    Try: MacNix: Change Mac OS X 10.7 Lion iCal and Address Book Skins from Leather to Aluminum.

  • How to create a webdynpro view dynamically and embed into view container?

    Hi all,
    Anyone knows how to create a view dynamically and embed the view into an existing view container?
    My layout looks like this:
    I have an existing view named main_view.
    Inside main_view, I create a view ui container named vcu_view.
    I embed the main_view into my window.
    I need the codes to create a view dynamically and embed the view into the view container. Anyone have any idea?
    Thanks in advance.
    Rgds,
    Siong Chao

    hi Siong Chao   ,,
    empty view insence ..( create a view without any UI element in it  ) in design time ..
    >
    Siong Chao wrote:
    > Hi Chinnaiya,
    >
    > How do you create an empty view dynamically then? Thanks in advance.
    i think we cannot create a new view dynamically because it is a webdynpro restriction ..
    NOTE: experts correct me if i am wrong in this answer
    Regards
    Chinnaiya P

Maybe you are looking for

  • How many times do you have to tell the call centre...

    I have had excellent service from BT with a line speed of some 7.5 to almost 9 meg download and around 1 meg upload. Recently my download speed slowed dramatically to 400k BUT the upload speed stayed the same. When I could no longer use iplayer Utube

  • How do I get back all the songs stored in iTunes after they were wiped out off my computer?

    How do I get back all the songs stored in iTunes after they were wiped out when I re-installed Windows 7?

  • Import invoice history

    Hello I am importing in DTW invoices from 1st of January until today. I have set all item as non stock item so tehre is no stock movements booked. Now my question is about cost price which field to use in B1 to have the margin calculation correct? My

  • PR release Workflow

    Hi All, Wanted to set up PR release workflow. 1. While having look at a template WS00000038, came to know that Agent assignment is not available for std template. Whereas documentation says that rule 00000148 shuld be used for item level release work

  • QT 6.5 Serial Works on Newest Version of Quicktime?

    I purchased a Quicktime 6.5 Pro Serial back in the day and never upgraded because I never needed to. I feel like upgrading now, just wondering if the same serial would work or whether I'd need to purchase or 'receive' a new serial from Apple.