{"id":1077,"date":"2017-02-12T14:05:36","date_gmt":"2017-02-12T06:05:36","guid":{"rendered":"http:\/\/j178.mtgbb.com\/?p=1077"},"modified":"2017-02-12T14:05:36","modified_gmt":"2017-02-12T06:05:36","slug":"ebs-r12-%e5%8f%96%e5%be%97%e5%ae%a2%e6%88%b6%e7%9a%84phone-email-url%e8%b3%87%e6%96%99","status":"publish","type":"post","link":"https:\/\/j178.mtgbb.com\/?p=1077","title":{"rendered":"EBS R12 \u53d6\u5f97\u5ba2\u6236\u7684phone, email, URL\u8cc7\u6599"},"content":{"rendered":"<p>\u8cc7\u6599\u4f86\u6e90\uff1a<a href=\"https:\/\/sanjaimisra.blogspot.tw\/2013\/12\/customers-phone-email-and-url.html\" target=\"_blank\">\u9019\u88e1<\/a><\/p>\n<p>\u806f\u7d61\u65b9\u5f0f(Contact point)\u53ef\u4ee5\u88ab\u65b0\u589e\u65bc\u5ba2\u6236\u4e3b\u6a94\u7684\u4e09\u500b\u5c64\u7d1a\uff1a\u5ba2\u6236\u5c64\u3001\u5730\u5740\u5c64\u3001\u806f\u7d61\u4eba.<\/p>\n<p><!--more--><\/p>\n<p><strong>\u5ba2\u6236\u806f\u7d61\u4eba(contacts)\u7684 phone, email, URL<\/strong>\uff1a<\/p>\n<pre lang=\"Oracle\">\r\nselect account_number \"Account Number\"\r\n     , obj.party_name \"Customer Name\"\r\n     , sub.party_name \"Contact Name\"\r\n     , hcp.contact_point_type || ': ' ||\r\n       DECODE(hcp.contact_point_type, 'EMAIL', hcp.email_address\r\n                                    , 'PHONE', hcp.phone_area_code || ' ' || hcp.phone_number\r\n                                    , 'WEB'  , hcp.url\r\n                                    , 'Unknow contact Point Type ' || hcp.contact_point_type\r\n             ) \"How to Contact\"\r\n  from apps.hz_cust_accounts  hca\r\n     , apps.hz_parties        obj\r\n     , apps.hz_relationships  rel\r\n     , apps.hz_contact_points hcp\r\n     , apps.hz_parties        sub\r\n where hca.party_id           = rel.object_id\r\n   and hca.party_id           = obj.party_id\r\n   and rel.subject_id         = sub.party_id\r\n   and rel.relationship_type  = 'CONTACT' \r\n   and rel.directional_flag   = 'F'\r\n   and rel.party_id           = hcp.owner_table_id\r\n   and hcp.owner_table_name   = 'HZ_PARTIES';\r\n<\/pre>\n<p><strong>\u5ba2\u6236\u5c64\u7d1a\u7684 Customer&#8217;s phone, email and URL<\/strong>:<\/p>\n<pre lang=\"Oracle\">\r\nselect account_number \"Account Number\"\r\n     , hp.party_name  \"Customer Name\"\r\n     , hcp.contact_point_type || ': ' ||\r\n       DECODE(hcp.contact_point_type, 'EMAIL', hcp.email_address\r\n                                    , 'PHONE', hcp.phone_area_code || ' ' || hcp.phone_number\r\n                                    , 'WEB'  , hcp.url\r\n                                    , 'Unknow contact Point Type ' || hcp.contact_point_type\r\n             ) \"How to Contact\"\r\n  from apps.hz_cust_accounts hca\r\n     , apps.hz_parties       hp\r\n     , apps.hz_contact_points hcp\r\n where hca.party_id          = hp.party_id\r\n   and hp.party_id          = hcp.owner_table_id\r\n   and hcp.owner_table_name = 'HZ_PARTIES';\r\n<\/pre>\n<p><strong>\u5730\u5740\u5c64\u7d1a\u7684 Phone, Email and URL<\/strong>\uff1a<\/p>\n<pre lang=\"Oracle\">\r\nselect account_number \"Account Number\"\r\n     , hp.party_name  \"Customer Name\"\r\n     , loc.address1 || \r\n       decode(loc.address2, null, null, ', ' || loc.address2) ||\r\n       decode(loc.address3, null, null, ', ' || loc.address3) ||\r\n       decode(loc.address4, null, null, ', ' || loc.address4) ||\r\n       ' ' || loc.city || ', ' || loc.state || ' ' || loc.postal_code \"Address\"\r\n     , hcp.contact_point_type || ': ' ||\r\n       DECODE(hcp.contact_point_type, 'EMAIL', hcp.email_address\r\n                                    , 'PHONE', hcp.phone_area_code || ' ' || hcp.phone_number\r\n                                    , 'WEB'  , hcp.url\r\n                                    , 'Unknow contact Point Type ' || hcp.contact_point_type\r\n             ) \"How to Contact\"\r\n  from apps.hz_cust_accounts hca\r\n     , apps.hz_parties       hp\r\n     , apps.hz_cust_acct_sites_all cas\r\n     , apps.hz_contact_points      hcp\r\n     , apps.hz_party_sites         hps\r\n     , apps.hz_locations           loc\r\n where hca.cust_account_id   = cas.cust_account_id\r\n   and hca.party_id          = hp.party_id\r\n   and hcp.owner_table_id    = cas.party_site_id\r\n   and hcp.owner_table_name  = 'HZ_PARTY_SITES'\r\n   and cas.party_site_id     = hps.party_site_id\r\n   and hps.location_id       = loc.location_id;\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u8cc7\u6599\u4f86\u6e90\uff1a\u9019\u88e1 \u806f\u7d61\u65b9\u5f0f(Contact point)\u53ef\u4ee5\u88ab\u65b0\u589e\u65bc\u5ba2\u6236\u4e3b\u6a94\u7684\u4e09\u500b\u5c64\u7d1a\uff1a\u5ba2\u6236\u5c64\u3001\u5730\u5740\u5c64\u3001\u806f\u7d61\u4eba.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[22],"tags":[52,57],"class_list":["post-1077","post","type-post","status-publish","format-standard","hentry","category-oracle-erp","tag-ebs12-1-3","tag-oracle-erp"],"_links":{"self":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/1077","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1077"}],"version-history":[{"count":0,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=\/wp\/v2\/posts\/1077\/revisions"}],"wp:attachment":[{"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1077"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1077"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/j178.mtgbb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1077"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}