How to get list of customers with PCMS API

Hi all,

I want to get a list of existing customers with pcms-api.

I have found from the documentation, a constant called PCMS_CUSTOMER. Normally this variable is objtype that I can use it to take information about customers. However, I tried to interog the database with PCMSQUERY but since the documentation I cannot use this constant with this way of interrogation. I looked in another document that talks about using a PO line to list customers but just found how to create a customer or delete a customer or update a customer. Can someone help me on the subject please?


  • I begin with this code :

    PcmsObjStruct obj = { 0 };
    int noUids = 0;
    char* object;
    obj.objType = PCMS_CUSTOMER;
    PcmsInitSpec(connexionID, object, PCMS_CUSTOMER, &obj);

    But I can't complete it to get the subject matter

  • Hello,

    I am afraid PCMS_CUSTOMER is not supported with PcmsQuery/PcmsFullQuery.

    Perhaps the possible option is similar to Releases - querying DB through the Published Views.


  • Hi Alex,

    Thank you about your answer.

    Can you have an example for querying DB through the Published Views please because i'm really stuck


  • Unfortunately I have no code example of Published View usage at hand.
    But how I'd imagine that - you will need to query your Dimensions DB either via dmdba ustility (execute and parse the output), or via ODBC driver directly from the code, or via native DBMS library (which depends on the DB type you use, say OCI for Oracle).

  • Publsihed views are documented in the Dimensions CM Reports Guide.  There is a view named pcms_customer_details and the defintion is given as:

    This view gives details on customers as stored in the database. The following fields are returned:

    customer_uid - The UID for the customer.

    customer_name - Customer's name.

    customer_loc - Customer's location.

    customer_project - Customer's project details.

    contact - Contact name.

    A simple query would be:

    select * from pcms_customer_details order by customer_name;

    This may be entered at a database at an sql prompt or into any query tool you like.  Depending on which client or interface you choose, there are probably formatting choices.


    There is also a related view to see which releases have been forwarded to a customer.

    pcms_customer_releases - releases forwarded to customers

    This view identifies releases that have been forwarded to customers. The following fields are returned:

    release_uid - The UID of a release forwarded to a customer.

    customer_uid - The UID of the customer to whom the release has been forwarded.

    date_time - The date and time of forwarding the release.

    customer_name - Customer's name.

    customer_loc - Customer's location.

    customer_project - Customer's project details.

    contact - Contact name.