forcedotcom/commerce-on-lightning

B2BDeliverySample.cls Error

iamowais11 opened this issue · 9 comments

B2BDeliverySampl.cls>>populateCartDeliveryGroupMethodWithShippingOptions(Method)

When inserting a new CartDeliveryGroupMethod record

Errors:
Field does not exist: Carrier on CartDeliveryGroupMethod
Field does not exist: ClassOfService on CartDeliveryGroupMethod
Field does not exist: ProductId on CartDeliveryGroupMethod
Field does not exist: ReferenceNumber on CartDeliveryGroupMethod
Field does not exist: IsActive on CartDeliveryGroupMethod

are we supposed to create these fields(Custom) on CartDeliveryGroupMethod

Hello @iamowais11 , would you mind describing the steps you took to reach this issue?

I'm facing the same issue, I created the org using the command:
sfdx commerce:scratchorg:create -u octb2bscratch_one@ava.com -a octb2bscratch_one -v devhub -w 15 --json
as per the https://github.com/forcedotcom/commerce-on-lightning/blob/develop/docs/setup-guide.md

Then I tried creating the B2C Store using the command:
sfdx commerce:store:create -n b2cstore02 -o b2c -b b2c_buyer@ava.com -u octb2bscratch_one -v devhub --apiversion=57.0

I get the message step 6 completed, then it starts to deploy a couple of files and results in the same error

@avaHitesh-github @iamowais11 Would it possible if you try an api version that is at least 58.0?

@tarcang The Scratch Org Version is already 58. I updated the store creation command to use 58.0, and still same error.

What version of the plugin you are using @avaHitesh-github ? You can check it with sfdx plugins and see the @salesforce/commerce field.

@tarcang
Output:

@salesforce/commerce 248.1.1
@salesforce/sfdx-scanner 3.17.0
community 2.4.4 (2.4.4)
shane-sfdx-plugins 4.43.0
├─ @mshanemc/plugin-streaming 1.1.7
└─ @mshanemc/sfdx-sosl 1.1.0

Have you created the scratch org (that is used for store creation) using the plugin as well? Does the scratch org you are working on have the B2B Commerce or D2C Commerce license is enabled?
https://developer.salesforce.com/docs/atlas.en-us.object_reference.meta/object_reference/sforce_api_objects_cartdeliverygroupmethod.htm

@tarcang
I'm using this doc: https://github.com/forcedotcom/commerce-on-lightning/blob/develop/docs/setup-guide.md

I've created a commerce scratch org only (7th command in the above doc)

I'm not facing this issue anymore. Probably got fixed with latest updates. @tarcang @iamowais11