locked
Parameters are not passed RRS feed

  • Question

  •  

    Hi NG,

     

    I have created a button in the isv.config.xml for the quotedetail entity. I need the entity guid in my page so I set PassParams="1". But this does not work. No Parameters are passed to my aspx page! Does anyone have any suggestions why this does not work?

     

    Code Snippet

    <Entity name="quotedetail">

    <Grid>

    <MenuBar>

    <Buttons>

    <Button

    Title="Neu"

    ToolTip="Create New"

    Url="http://PC-01/test/CRM_Offer_Template/AddProducts.aspx"

    PassParams="1"

    Client="Web"

    />

    </Buttons>

    </MenuBar>

    </Grid>

    </Entity>

     

     

    Greetings

     

    Gerrit

    Thursday, February 7, 2008 2:30 PM

Answers

All replies

  • PassParams does not work on buttons on the grid, because a user may select many items in a grid, and PassParams can only pass the details of one item. If you want to pass information about only one item, then add the button to the toolbar.

     

    If you do want to use a button on the grid, see the following articles about how the selected items are passed as properties of dialogArguments

     

    http://msdn2.microsoft.com/en-us/library/cc150860.aspx

     

    http://msdn2.microsoft.com/en-us/library/bb267367.aspx

     

    Thursday, February 7, 2008 3:32 PM
    Moderator
  • I agree with David, and you can only pass parameters on the button while on grid tool bar, see here one more aticle

     

    http://blogs.msdn.com/crm/archive/2007/02/05/accessing-selected-records-in-a-grid.aspx

     

    here is toolbar button and pass to javascript 

     

    http://dmcrm.blogspot.com/2006/12/toolbar-buttons-on-gridlist-view.html

     

     

    http://ronaldlemmen.blogspot.com/2007/06/fetching-selected-records-in-grid.html

     

    Let me know if still any problem

     

     

    Best Regards,

    Imran

     

    http://microsoftcrm3.blogspot.com

     

     

    Friday, February 8, 2008 7:40 AM
    Moderator
  • Hi i created a toolbar button in my Quote form.

    I need to pass to the url a parameter, the quote id.
    ISV code:
    <Entity name="quote">
      <ToolBar ValidForCreate="1" ValidForUpdate="1">
       <Button Title="Print Quote" ToolTip="Click to print the quote" Icon="/_imgs/ico_18_debug.gif" Url="http://localhost/Reports/Pages/Report.aspx?ItemPath=%2fBPS_MSCRM%2fQuotes" PassParams="1"  Client="Web, Outlook"
    AvailableOffline="true" />
       <ToolBarSpacer />
      </ToolBar>  
       </Entity>

    My query is:

    SELECT     dbo.FilteredQuote.accountidname, dbo.FilteredQuote.name,dbo.FilteredQuote.quoteid, dbo.FilteredQuoteDetail.productidname,dbo.FilteredQuoteDetail.productdescription,
                          dbo.FilteredQuoteDetail.quantity, dbo.FilteredQuoteDetail.priceperunit, dbo.FilteredQuoteDetail.extendedamount, dbo.FilteredQuote.modifiedon,
                          dbo.FilteredQuote.accountid, dbo.FilteredAccount.accountid AS Expr1, dbo.FilteredAccount.primarycontactidname, dbo.FilteredAccount.telephone1,
                          dbo.FilteredAccount.emailaddress1
    FROM         dbo.FilteredQuoteDetail INNER JOIN
                          dbo.FilteredQuote ON dbo.FilteredQuoteDetail.quoteid = dbo.FilteredQuote.quoteid INNER JOIN
                          dbo.FilteredAccount ON dbo.FilteredQuote.accountid = dbo.FilteredAccount.accountid
    where dbo.FilteredQuote.quoteid=@quoteid

    How can i pass the parameter?

    It's urgent!!

     

    Friday, February 8, 2008 7:40 AM
  •  

    Thank you very much! I'll try to use a button in the default dialog!

    Friday, February 8, 2008 9:39 AM
  • Any help for me?

     

    Friday, February 8, 2008 10:21 AM
  •  Hi.

     

    Instead on using the Url attribute use the JavaScript attribute

    JavaScript="

                location.href = "some url.aspx?quoteid=" + crmForm.ObjectId;

    " />

     

    Adi

     

    Saturday, February 9, 2008 6:11 PM