Salesforce REST API与包装器不起作用创建订单类

发布于 2025-02-04 13:44:10 字数 1283 浏览 5 评论 0原文

任何人都可以解决此问题,因为IM获得错误 - 方法不存在或不正确签名:void productmap(string)来自类型createorders

        Order ord = new Order(
        AccountId = oderWrap.AccountId,
        
        EffectiveDate = EffectiveDate,
        Status = oderWrap.Status,
        PriceBook2Id = PricebookList[0].id,
        contractid = contractMap.get(oderWrap.AccountId).id,
        ShippingStreet = contractMap.get(oderWrap.AccountId).Account.ShippingStreet,
        ShippingCity  = contractMap.get(oderWrap.AccountId).Account.ShippingCity,
        ShippingpostalCode = contractMap.get(oderWrap.AccountId).Account.ShippingpostalCode,
        ShippingCountry = contractMap.get(oderWrap.AccountId).Account.ShippingCountry,
        ShippingState = contractMap.get(oderWrap.AccountId).Account.ShippingState
    );
    for(OrderWrapper.OrderLineItems oderLineItem  : oderWrap.OrderLineItems){
        product2 pro = productMAp(oderLineItem.LineItemCode);
        PricebookEntry pbe = PricebookEntryMAp(pro.id);
        OrderItemList.add(createOrderLineItimes(ord,integer.valueof(oderLineItem.Quantity),pro,pbe));
    }
    if(ord!=null){
        insert ord ;
        for(OrderItem poLine : OrderItemList) {
            poLine.orderid =poLine.order.Id;
        }
        insert OrderItemList;
    }

anyone can solve this issue as im getting Error - Method does not exist or incorrect signature: void productMAp(String) from the type CreateOrders

        Order ord = new Order(
        AccountId = oderWrap.AccountId,
        
        EffectiveDate = EffectiveDate,
        Status = oderWrap.Status,
        PriceBook2Id = PricebookList[0].id,
        contractid = contractMap.get(oderWrap.AccountId).id,
        ShippingStreet = contractMap.get(oderWrap.AccountId).Account.ShippingStreet,
        ShippingCity  = contractMap.get(oderWrap.AccountId).Account.ShippingCity,
        ShippingpostalCode = contractMap.get(oderWrap.AccountId).Account.ShippingpostalCode,
        ShippingCountry = contractMap.get(oderWrap.AccountId).Account.ShippingCountry,
        ShippingState = contractMap.get(oderWrap.AccountId).Account.ShippingState
    );
    for(OrderWrapper.OrderLineItems oderLineItem  : oderWrap.OrderLineItems){
        product2 pro = productMAp(oderLineItem.LineItemCode);
        PricebookEntry pbe = PricebookEntryMAp(pro.id);
        OrderItemList.add(createOrderLineItimes(ord,integer.valueof(oderLineItem.Quantity),pro,pbe));
    }
    if(ord!=null){
        insert ord ;
        for(OrderItem poLine : OrderItemList) {
            poLine.orderid =poLine.order.Id;
        }
        insert OrderItemList;
    }

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

笑红尘 2025-02-11 13:44:10

很难说,“ productmap”的类型是什么?

您的意思是使用productmap.get(oderlineItem.lineItemCode)吗?

Hard to say, what's the type of "productMap"?

Did you mean to use productMap.get(oderLineItem.LineItemCode)?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文