zoukankan      html  css  js  c++  java
  • Using X++ code get your Intercompany CustAccount

    Ever wonder if there is an easy way to find out what customer account a sales company has at the production company?

    This might not be an easy way, but it is one way to do it:

    remark by Jimmy on May 26th 2011

    static void Jimmy_IntercompanyCustAccount(Args _args)
    {
    VendTable vendTable;
    AifEndpointId endpointId;
    AifEndpoint toEndpoint,meEndPoint;
    AifEndPointConstraint endPointConstraint;
    ;
    // Intercompany Vendor = 60001.
    vendTable = VendTable::find("60001");//execute in qvsHK account

    // Get Vendor endpointId.
    endpointId = vendTable.interCompanyEndpointId();

    // Get the endpoint.
    toEndpoint = AifEndPoint::find(endpointId);

    // Change to endPoint company.
    changecompany(toEndpoint.InterCompanyCompanyId)
    {
    // Get your endpoint in Parent company.
    meEndPoint = AifEndpoint::findInterCompany(toEndpoint.dataAreaId);
    // Find customer constraint.
    endPointConstraint = AifEndPointConstraint::find(meEndPoint.EndpointId,AifConstraintType::Customer);
    }

    // ConstraintId = Your customer account.
    info(endPointConstraint.ConstraintId);//QVSHK
    }
  • 相关阅读:
    B树,B+树
    中断
    死锁
    无锁队列
    Cookie和Session
    分布式系统一致性
    c++ 标准库迭代器失效
    html5 app图片预加载
    html5 手机APP计算高度问题
    html5 750 REM JS换算方法
  • 原文地址:https://www.cnblogs.com/Fandyx/p/2057892.html
Copyright © 2011-2022 走看看