Commander
Commander
374 views

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?

 

0 Likes
5 Replies
Commander
Commander

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

0 Likes
Micro Focus Expert
Micro Focus Expert

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.

--
Regards,
Alex

0 Likes
Commander
Commander

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 😞

 

0 Likes
Micro Focus Expert
Micro Focus Expert

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

Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

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.

 

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.