commerce-on-lightning icon indicating copy to clipboard operation
commerce-on-lightning copied to clipboard

B2BDeliverySample.cls Error

Open iamowais11 opened this issue 1 year ago • 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

iamowais11 avatar Sep 04 '23 08:09 iamowais11

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

tarcang avatar Sep 05 '23 18:09 tarcang

I'm facing the same issue, I created the org using the command: sfdx commerce:scratchorg:create -u [email protected] -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 [email protected] -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 avatar Oct 10 '23 07:10 avaHitesh-github

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

tarcang avatar Oct 10 '23 15:10 tarcang

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

avaHitesh-github avatar Oct 10 '23 15:10 avaHitesh-github

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

tarcang avatar Oct 10 '23 15:10 tarcang

@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

avaHitesh-github avatar Oct 10 '23 16:10 avaHitesh-github

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 avatar Oct 10 '23 17:10 tarcang

@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)

avaHitesh-github avatar Oct 10 '23 17:10 avaHitesh-github

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

avaHitesh-github avatar Oct 25 '23 15:10 avaHitesh-github