Looking for old forum posts and information? View the old forum archive here ยป
Welcome to Vortx Community Forum, where you can ask questions and receive answers from the staff at Vortx and other members of the community.

If you had a user account on our previous forums website, you will need to register a new account here.

A static copy of our previous forums website is available online for reference. Click here to access the forum archive.

Learn more about...

AspDotNetStorefront
DotFeed

How to invoke "CustomerID" as queryparam?

I am trying to use CustomerID for a <queryparam /> but I cannot get it to use the actual session parameter, only the default value of 0. Here's what I have:

<queryparam paramname="@CustomerID" paramtype="request" requestparamname="CustomerID" sqlDataType="int" defvalue="0" validationpattern="" />

If I substitute paramtype="system" for paramtype="request" the whole thing breaks.

How can I invoke the actual logged in CustomerID as a queryparam?

asked Feb 21 in MultiStore by jcarswell (180 points)

1 Answer

0 votes
 
Best answer
Request-type params have to be passed in to the XmlPackage, most commonly as querystring values.  To use that type of parameter you'll have to add that to wherever you're invoking the XmlPackage.

Depending on the version you're on though, there ought to be a System parameter you can use, called CurrentCustomerID.  You can change paramtype to system and requestparamname to CurrentCustomerID and that should work.
answered Feb 21 by Vortx ScottS (12,270 points)
selected Mar 7 by jcarswell
Thanks. I'm on AspDotNetStorefront MultiStore 10.0.2.0/10.0.2.

I gave your suggestion a quick shot and the page broke when I substitued "CurrentCustomerID" and "system". Is it possible this is something else for my version?

I need to give it a closer look when I have a minute though. I appreciate your assistance!

The right syntax for this was
 

<queryparam paramname="@CustomerID"	paramtype="system"	requestparamname="CustomerID" sqlDataType="int"	defvalue ="0" validationpattern="^\d{1,10}$" />

 

...