Commerce Server General - Purchase Order, HonorStatus & ApplicationId

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server General > March 2007 > Purchase Order, HonorStatus & ApplicationId





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Purchase Order, HonorStatus & ApplicationId
Steve H.

2007-01-18, 7:19 pm

Hi,
I am trying to save my basket as Purchase Order. The process completes with
no errors, however I edited the Purchase order schema to allow for 2 weakly
typed properties (1 integer and the other is a string).
When I try to save my order after the values are added the following error
is raised:

System.InvalidOperationException: This overload of PurchaseOrder.Save method
cannot be used when HonorStatus flag is set to true in the configuration
file. Please use the other overload which takes applicationId as parameter.

Here is a code sample:


PurchaseOrder PO = Basket.SaveAsOrder();
PO["CountA"] = 23;
PO["PID"] = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
PO.Save(); // The error is raised here , at this line

Any ideas ?

IlkkaP

2007-01-19, 7:27 pm

Look at the StatusManager table in the transactionconfig database.
The table indicates who can modify orders that are in a certain state.
I guess you are using the Site application id, which can modify only orders
in NewOrder state.
You can add a new row for Site application id or use PO.Save("LOB Adapter")
to override.
Or disable StatusManager from the web.config. I'd recommend the first
option.

For more info see the documentation of the Save method.



"Steve H." <SteveH@discussions.microsoft.com> ha scritto nel messaggio
news:5BBDD09C-60C0-45A9-B79F-FD827722A5CE@microsoft.com...
> Hi,
> I am trying to save my basket as Purchase Order. The process completes
> with
> no errors, however I edited the Purchase order schema to allow for 2
> weakly
> typed properties (1 integer and the other is a string).
> When I try to save my order after the values are added the following error
> is raised:
>
> System.InvalidOperationException: This overload of PurchaseOrder.Save
> method
> cannot be used when HonorStatus flag is set to true in the configuration
> file. Please use the other overload which takes applicationId as
> parameter.
>
> Here is a code sample:
>
>
> PurchaseOrder PO = Basket.SaveAsOrder();
> PO["CountA"] = 23;
> PO["PID"] = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
> PO.Save(); // The error is raised here , at this line
>
> Any ideas ?
>



Steve H.

2007-01-19, 7:27 pm

Well, I found the answer, I am gonna post it here for those who stumble upon
the same problem.

Open your %website_name%_TransactionConfig database, you should find a table
named: StatusManager, open it and you should found several records.

The default used by the website is called: Site (make sure it exists in the
table).

Use that name "Site" as application Id

"Steve H." wrote:

> Hi,
> I am trying to save my basket as Purchase Order. The process completes with
> no errors, however I edited the Purchase order schema to allow for 2 weakly
> typed properties (1 integer and the other is a string).
> When I try to save my order after the values are added the following error
> is raised:
>
> System.InvalidOperationException: This overload of PurchaseOrder.Save method
> cannot be used when HonorStatus flag is set to true in the configuration
> file. Please use the other overload which takes applicationId as parameter.
>
> Here is a code sample:
>
>
> PurchaseOrder PO = Basket.SaveAsOrder();
> PO["CountA"] = 23;
> PO["PID"] = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx";
> PO.Save(); // The error is raised here , at this line
>
> Any ideas ?
>

atsofttech@yahoo.com

2007-03-20, 1:18 pm

On Jan 19, 5:54 pm, "IlkkaP" <nom...@spam.com> wrote:
> Look at the StatusManager table in the transactionconfig database.
> The table indicates who can modify orders that are in a certain state.
> I guess you are using the Site application id, which can modify only orders
> in NewOrder state.
> You can add a new row for Site application id or use PO.Save("LOB Adapter")
> to override.
> Or disable StatusManager from the web.config. I'd recommend the first
> option.
>
> For more info see the documentation of theSavemethod.
>
> "Steve H." <Ste...@discussions.microsoft.com> ha scritto nel messaggionews:5BBDD09C-60C0-45A9-B79F-FD827722A5CE@microsoft.com...
>
>
>
>
>
>
>
>
> - Show quoted text -



I am new in Commerce Server 2007.
Could you please tell what is LOB Adapter
How to do this?

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com