EPiServer Upgrade and Issue Saving to a MetaField

Vote:
 

We've currently upgraded to the latest commerce and cms versions as of 4/8/2021.  Running into an issue where no meta data is being saved on an order anywhere.  We have custom meta fields on line items, on the order itself, etc...  After the upgrade this data was no longer saved, however the order is intact.

We set meta fields like such:
lineItem.SetMetaField("RecipientsEmail", input.GcRecipientsEmail);

We save order by calling AcceptChanges() on the Cart object

I'm curious if we need to be saving changes now via the IOrderRepository instead.  In any case, does it make sense that these calls will no longer work in the latest version of commerce?

Thanks

#252947
Apr 09, 2021 19:12
Vote:
 

Save your value using the Properties collection:

lineItem.Properties["RecipientsEmail"] = input.GcRecipientsEmail;

AcceptChanges on the Cart object will save it directly to the database. IOrderRepository.Save() however will also run the order group calculator, we use this one 99% of the time.

#252949
Edited, Apr 09, 2021 22:41
Vote:
 

Which version you upgraded from, and to? 

#253013
Apr 11, 2021 6:41
Vote:
 

We went from Commerce 12.7.1 to 13.30.0

#253045
Apr 12, 2021 1:44
Vote:
 

Is that breaking only for one metafield or others, can you create a new field and try with that?

Also metafield is case sensitive so make sure in database the field name is seted correctly?

#253046
Edited, Apr 12, 2021 2:25
Vote:
 

I can try a new meta field, that's a good test.  However, this is across the board.  So far i've only tested line item meta fields and ordergroup meta fields, all do not save.  Im gonna test other meta fields today and also try creation a new one.

Thanks

P.S. this did not work from the first reply:    lineItem.Properties["RecipientsEmail"] = input.GcRecipientsEmail;

I tried:

lineItem.Properties["RecipientsEmail"] = input.GcRecipientsEmail;

lineItem["RecipientsEmail"] = input.GcRecipientsEmail

lineItem.SetMetaField("RecipientEmal") =  = input.GcRecipientsEmail

#253071
Apr 12, 2021 13:50
Vote:
 

FYI, I tested a new meta field.... still not saving that data either

#253073
Apr 12, 2021 14:31
Vote:
 

Todd can show us the complete code?

#253074
Apr 12, 2021 14:36
Vote:
 

As for the version, we went from commerce 12.17.1 to 13.30.0....... had a typo on the from version

#253076
Apr 12, 2021 14:42
Vote:
 

Here is some more information from a SQL trace....   the f# values are the custom meta fields that we have set up.  NOTICE: in the upgraded environment the fields are null. for example "jane232323@gmail.com" is a custom meta field value that should be in the first call below, but it's null

STAGING (this environment has the upgrade)

declare @p7 int
set @p7=NULL
exec mdpsp_avto_LineItemEx_Update @ObjectId=39673446,@CreatorId=NULL,@Created='2021-04-12 14:52:47.320',@ModifierId=NULL,@Modified='2021-04-12 14:52:47.900',@Language=N'en-us',@Retval=@p7 output,@f1=NULL,@f2=NULL,@f3=0,@f4=NULL,@f5=NULL,@f6=NULL,@f7=NULL,@f8=NULL,@f9=NULL,@f10=NULL,@f11=NULL,@f12=NULL,@f13=NULL,@f14=NULL,@f15=NULL,@f16=NULL,@f17=NULL,@f18=NULL
select @p7

DEVELOPMENT (this environment is our current epi commerce version that works  12.17.1)

declare @p7 int
set @p7=NULL
exec mdpsp_avto_LineItemEx_Update @ObjectId=40369391,@CreatorId=NULL,@Created='2021-04-12 14:47:18.697',@ModifierId=NULL,@Modified='2021-04-12 14:47:19.133',@Language=N'en-us',@Retval=@p7 output,@f1=N'Store Brand',@f2=NULL,@f3=NULL,@f4=0,@f5=NULL,@f6=NULL,@f7=NULL,@f8=NULL,@f9=N'test888888',@f10=NULL,@f11=NULL,@f12=NULL,@f13=N'AM',@f14=N'jane232323@gmail.com',@f15=N'jane',@f16=N'Joe',@f17=NULL,@f18=NULL
select @p7

#253077
Apr 12, 2021 15:04
Vote:
 

Here is the output from the database update that we executed when upgrading....

PM> Update-EPiDatabase
Found no files to process
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.11.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.12.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.13.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.14.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.16.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.19.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\7.19.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\8.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\8.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\8.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\8.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\8.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\8.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.0.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.0.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.1.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.6.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.8.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.8.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\9.8.3.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.3.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.4.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\10.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.3.3.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.3.4.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.5.4.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.8.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.10.7.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.12.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.13.3.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.14.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.15.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.15.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.17.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.19.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.20.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.CMS.Core.11.20.6\tools\epiupdates\sql\11.20.3.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_CMS\sql\7.6.0.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_CMS\sql\8.0.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_CMS\sql\8.0.1.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_CMS\sql\9.0.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.1.0.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.1.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.1.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.2.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.2.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.3.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.4.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.5.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.5.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.5.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.6.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\5.6.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.0.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.0.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.0.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.1.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.1.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.2.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.3.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.3.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.3.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.4.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.4.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.4.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.4.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.5.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.6.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.7.0.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.7.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.8.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.9.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.9.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.9.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.9.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\6.10.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.11.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.12.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.13.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.14.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.15.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.0.16.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.1.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.1.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.2.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.2.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.2.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.3.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.3.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.4.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.5.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.6.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.6.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.6.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.6.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.6.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.7.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.8.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.9.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.10.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\7.10.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.11.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.0.12.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.1.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.1.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.1.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.1.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.1.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\8.1.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.0.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.0.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.0.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.0.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.0.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\9.1.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.0.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.1.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.2.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.3.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.4.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.5.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.6.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.7.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.8.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.9.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.10.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.11.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.12.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.13.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.14.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.15.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.16.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.17.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.18.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.19.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.20.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.21.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.22.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.23.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.24.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.25.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.26.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.27.0.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Commerce.Core.13.30.0\tools\epiupdates_commerce\sql\10.0.28.0.sql
Found no files to process
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.KPI.2.5.5\tools\epiupdates\sql\1.0.0.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.1.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.2.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.3.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.4.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.5.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.6.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.7.sql
Processing C:\Projects\Turn5\AmericanMuscle\packages\EPiServer.Marketing.Testing.2.6.6\tools\epiupdates\sql\1.0.0.8.sql

#253078
Apr 12, 2021 15:05
Vote:
 

You might try to run

exec mdpsp_sys_CreateMetaClassProcedureAll 

to recreate all SPs for metaclasses 

#253079
Apr 12, 2021 15:08
Vote:
 

As for the code, it's just the following

if (!input.GcRecipientsEmail.IsNullOrWhiteSpace() && !input.GcRecipientsEmail.EqualsNoCase("none"))
                    lineItem.SetMetaField("RecipientsEmail", input.GcRecipientsEmail);

_cart.AcceptChanges();

_cart.RunCartPrepare();

#253080
Apr 12, 2021 15:09
Vote:
 

Quan, that did NOT work.  Still NULL values.

#253081
Apr 12, 2021 15:16
Vote:
 

Time to reach out to developer support service then!

#253082
Apr 12, 2021 15:24
Vote:
 

Hi Quan, Todd

Was this ever resolved? I'm experiencing the same issue on Commerce 13.30.0, where cart level metafields are not copying over to Order level at all. I have mapped the same metafields on both OrderFormEx and PurchaseOrder.

Regards

Ritu

#259359
Jul 23, 2021 17:25
Vote:
 

Yes, we have abstracted some of the epi objects but here was my fix....    NOTE: don't get hung up on the all the wrapping of epi objects we're doing... the key is really just the CopyPropertiesFrom() method.

_cart | Epi Cart object

UnderlyingObject | Epi LineItem object

ILineItemWrapper | Wraps Epi's LineItem object


Failed after upgrade:

public void AddLineItem(ILineItemWrapper lineItem)
        {
            _cart.AddLineItem(lineItem.UnderlyingObject);
        }

Fix:

public void AddLineItem(ILineItemWrapper lineItem)
        {
            var createdLineItem = _cart.CreateLineItem(lineItem.Code);
            createdLineItem.CopyPropertiesFrom(lineItem.UnderlyingObject);
            _cart.AddLineItem(createdLineItem);
        }

Basically you have to copy all properties from the line item object passed in to the newly created line item on the cart object.

#259360
Edited, Jul 23, 2021 18:07
Vote:
 

Hey Todd

This looks like you are copying metafield values from one lineitem(object) to another(lineitem). I have all metafields setup on cart. While its still a cart, I see them populated in SerializableCart json. But as soon as I do orderRepo.SaveAsPurchaseOrder(), the PO gets created, but none of those meta fields get populated under OrderFormEx. Do I have to add programmatic logic to do that now? Wasn't this built in?

@Quan, I also saw another forum post where the same functionality had broken on some minor version of v 10 and then got fixed on another minor version of v 10. Could it be possible it broke again on version 13.30?

Old forum post : https://world.optimizely.com/forum/developer-forum/Commerce/Thread-Container/2017/3/order-address-metafields-saving-issue/

#259361
Jul 23, 2021 18:34
Vote:
 

We call SaveAsPurchaseOrder() and then manually copy over our meta field values from cart to purhcase order object.  So SaveAsPurchaseOrder() should probably really be called CreatePurchaseOrder().  Much like CreateLineItem() in my example above.

#259362
Jul 23, 2021 19:19
Vote:
 

Hey Todd

That means there is a bug in current commerce version, becasue this worked OOTB before.

@Quan

Can you please confirm.

Regards

Ritu

#259479
Jul 26, 2021 15:22
Vote:
 

I unfortunately can't confirm or deny anything. I am no longer with Commerce team so I can be heavily outdated 

#259521
Jul 27, 2021 14:23
Vote:
 

Thanks Quan! I'm inclined to log this as a bug in Commerce v13. In the meantime will follow Todd's suggestion to copy these over manually.

#259523
Jul 27, 2021 15:10
Vote:
 

I can, however, ask Commerce team to look into this. Am on vacation so I forgot I still have that privilege :). 

#259526
Jul 27, 2021 18:23
Vote:
 

Ritu,

I believe the field type and name has to match correctly. I had encountered this once, when I had the meta field marked as multi lingual and it was failing to save correctly. 

~ Sujit

#263676
Sep 23, 2021 20:42
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.