I'm trying to obtain data from Service Cloud Salesforce but when I select the table in SSMS, the data is all NULL, so probably I'm not specifying the right columns or table.
Salesforce Report Builder
Salesforce Source Editor (Visual Studio)
When I run the report in Salesforce I can see that the country and postal code data are filled in, but when I read the documentation, I don't find the main column "Country" neither "Mailing Zip/Postal Code".
For the Zip Code, in this example, since it's also filled in the data about Billing Postal Code, this one I could obtain in the extraction, but for the country I can't find a column named "country", only "BillingCountry" and "ShippingCountry", but these columns do not contain any information.
Documentation:
https://developer.salesforce.com/docs/atlas.en-us.234.0.object_reference.meta/object_reference/sforce_api_objects_account.htm
Can anyone help here? I need to add on the select in salesforce source editor (visual studio) the right column names to obtain the country and the zip code.
Thank you,
Your report mixes fields from Account and Contact joined together by Contact.AccountId = Account.Id. You could edit it and expand the left sidebar to see which field comes from which object.
Account has Billing and Shipping address (2 sets of fields with actual names becoming BillingCity, BillingStreet... And Contact has Mailing address and Other Address.
So that's 4 * 6 fields across 2 tables out of the box. Can be muddied up further if you have "Person Accounts" enabled (some contacts get paired up as 1:1 relation to account instead of 1:n, in something that behaves a bit like materialised view for MS SQL people?). Also admin could rename one of the fields (API Names of columns stay the same but you'd see different labels in report and UI), add custom address fields...
See how these queries work for you. Try them out in Salesforce Developer Console (in web UI), or VSCode first, not in that tool you have.
Pure contacts
SELECT Id, FirstName, LastName, MailingStreet, MailingCity, MailingPostalCode
FROM Contact
WHERE MailingPostalCode = '4465-613'
LIMIT 10
Pure accounts
SELECT Id, Name, BillingStreet, BillingCity, BillingPostalCode
FROM Contact
WHERE BillingPostalCode = '4465-613'
LIMIT 10
Now JOIN (for normal Salesforce, B2B, where Account is more like a company and Contact is more like employee)
SELECT Id, FirstName, LastName, MailingStreet, MailingCity, MailingPostalCode, Account.Name, Account.City
FROM Contact
WHERE MailingPostalCode = '4465-613' AND Account.BillingPostalCode = '4465-613'
LIMIT 10
And since your second screenshot looks like you do have person accounts (more like B2C model, with standalone "1 man companies" like freelancers, doctors working in multiple hospitals, students in education...) try this one too
SELECT Id, Name, BillingCity, BillingPostalCode, ShippingCity, ShippingPostalCode, PersonMailingCity, PersonMailingPostalCode, PersonOtherCity, PersonOtherPostalCode
FROM Account
WHERE IsPersonAccount = true
LIMIT 10
React-SPA (client-side-routing)
I have this scenerio .I have a table with many products. And a table have an ID column. When user select multiple ID for example : 023653,023654,023655,023656 (basically they can select as many as they want )
The product URL is : localhost:3000/products
When the user selects multiple products and they trigger the button for example: calculate products .
The user will endup in this URL : localhost:3000/products/023653&023654&023655&...
As you can image if user selects more than 10 items the url would be awfully long.
The reason I want to do it this way is I want the userA to be able to send their selected page to the userB for example (localhost:3000/products/023653&023654&023655&). And once the user B open this page they will see everything the userA can see. What is the ideal way to solve it ?
Thank you in advanced :)
I have a written an invoice report that bundles up various charges to customers during a month. I have a filter set to a Parameter for a customer code that I am using for testing purposes. The final product, however, I would like to be able to specify a date and have a separate invoice (ideally it's own PDF) generated for each customer. Is this achievable in SSRS?
Notes: Invoice number is a generated field that is a combo of MM-YYYY-CustCode so we don't need a register or some sort of incrementing facility for the invoice number.
Emailing the resulting PDFs to one email address is acceptable so we don't need the system to pull a unique address for each customer.
The selection string from the SQL is as follows (not sure its needed but just in case)
CAST(VP_BSL_OWnerTrn.accountingdate AS DATE) = #accountingdate
AND (VP_BSL_OWnerTrn.code = 'Rental Com'
OR VP_BSL_OWnerTrn.code = 'Mgmt Fee'
OR VP_BSL_OWnerTrn.code = 'Gifts/Amen'
OR VP_BSL_OWnerTrn.code = 'Handling')
AND VP_BSL_OWnerTrn.Price_Local <> 0
AND VP_BSL_OWnerTrn.RoomNo = #RoomNo
Thanks in advance for any help/advice.
On Magento 1.6 with 4000+ products. Over half have the following error when trying to sort by SKU:
in Admin Product Grid
also: in Admin Product Grid searching for some products by sku yields no result (but they are in the grid and have a numeric sku set)
Frontend, the products look and work fine, but cannot be found by searching the sku.
Having inspected the database a bit, it seems that the products that are not working have an entry missing in:
catalog_product_entity_varchar
If I edit a product, change the sku, save, then re-edit and restore the original sku its all back to normal and working again. dont want to do that 2500+ times. Do you think I can programatically rebuild the missing sku entries in catalog_product_entity_varchar ? is there a better route?
Looking in the category_product_flat tables, the sku field for the broken products is set to null. Why would the SKU data not carry over from the main catalog_product_entity table?
I guess you imported the products and forgot to set the right sku field.
You could just fetch the collection via:
$count=0;
foreach (Mage::getModel('catalog/product')->getCollection() as $_product){
$count++;
$_product->setSku("SKU".$count);
$_product->save();
}
Of course you can set the sku to something that makes more sense...
Is there a way by which I can programmatically update a select options list of LineItems?
I am trying to create Line Items from data provided by site administrators.
If you refer to http://178.79.128.76/coronet/node/78, you will see 4 types of data: The Viewing date, The Viewing options, Add to cart button and Show Times.
The Show Times data is unique for each product. Each entry consists of a date and one or more time(s).
The Viewing Options is a line item and I am trying to populate it with data extracted from the Show Times field in the following format:
Viewing Date 1 + ShowTime 1
Viewing Date 1 + ShowTime 2
Viewing Date 2 + ShowTime 1
Just for demonstrating my objective, I populated the example data above in my Viewing Options Line Item using hook_form_alter - they don't actually work when you select and attempt to add the product to.
You can have your tables set up with LineItem table, a ViewDate table and a ShowTimes table. That will allow you to have a ViewDate collection with a foreign key to the LineItem, and a ShowTimes collection with a foreign key to the ViewDate.