how to create California in the DNN list in NB_Store country list - dotnetnuke

hi
I want to know "how to create California in the DNN list in NB_Store country list?" This is for implementing tax to California state Only. In order to do this i have created txapplies.list and put CA. But i can't get the result.
Thanks in advance.

I haven't tried it myself, because my test DNN deployment is busy, but I think adding a relevant entry to the List table will do the trick.
Here is SQL that retrieves countries from the Lists table:
select listname,value,text,parentid from lists where listname = 'Country'
Queue that up in SSMS, and try adding a country manually
Keep in mind, DNN utilizes heavy caching by default -- you may need to disable caching in your host settings for this test.

Related

How can i get elements in select using by example, whereDoesntHave in Laravel 8 and Filament?

I've three tables Users, company and user_company (pivot). I need to, for example, associate users to a company in a form using select that show me only the user are nit associated to this company.
Could anybody help me?
Thanks in advance
check the Filaments Documentation on the relationshipmanager AND
#Attaching and detaching records either manually or by --attach when creating the relationship manager
Ensure withPivot is included in the EloquentModel and check the getRelations in the modelresource
See docs #Populating automatically from a relationship
This works for me:
Forms\Components\Select::make('companyId')
->multiple()
->relationship('companies','company_name'),

How can I traverse through multiple related objects based on ID and return some related field?

I'm a little stuck.
I am trying to generate a report that determines whether anyone has made a manual change to certain fields within our order framework. I have figured out the proper fields and structures to audit, and even how to make the report, but I used a combination of extracts from the Dataloader and Excel xlookups to make it. Now, I'm being asked to find a way to automate the generation of the report, and I suspect that means I need to write a SOQL query to figure it out. I'm having trouble traversing multiple relationships based on these ID fields. Essentially, what I'm trying to do is make multiple "left joins" based on the 18 digit Salesforce IDs and extract some related piece of information from those other objects.
For example, if I'm starting with order_product_history (with a field OrderProductID to identify the order product) and I want to bring in "Product Name", I have to first match OrderProductID with the ID field in my order_product "table", then I have to match the Product2ID field in my order_product "table" with the ID in my product "table", then I have to get the matching Product Name as a column in my report:
Matching/Traversal Process
Desired Result
That's one example for one field. I also have to bring in things like User Name from the users "table", and order number from the orders table, but once I get the general idea, I think I'll be OK. I also want to filter the results to only include my Fee__c and UnitPrice fields, ignore the automated users and set a date filter--not sure if I have to do that using a WHERE clause just in my main query, or if I have to filter the subqueries as well.
I am not a programmer and I have no formal Salesforce training; I am just an analyst who is technically inclined and sort of fell into the role of Salesforce Admin. I am familiar with programming concepts and have been writing things using the flow application and have even dipped my toes into some Apex stuff, but it can be a bit of a struggle. I am not asking you to do my job for me and I am willing to work at the problem and learn; any help is appreciated. Sorry about the links; SO won't let me embed images yet.
There's high chance you don't have to write any code for it. I'll give you some tips, experiment a bit and edit the question or post new one?
This diagram might help: https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_erd_products.htm
Developer way
It's all about writing the right query. You can play with it in Developer Console or Workbench for example. Read up about relationship queries in SF.
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_understanding.htm
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_query_hist.htm
I don't have org with orders enabled but this should be a good start:
SELECT CreatedById, Created.Name,
Parent.Name, Parent.Product2.Name, Parent.Order.Name,
Field, OldValue, NewValue, CreatedDate
FROM OrderItemHistory
If it throws errors about "Parent" see if "OrderItem" will work. Once you have it - WHERE Field IN ('UnitPrice', 'Fee__c') AND CreatedDate = LAST_WEEK might be good next step. (dates can be filtered by date but there are few "constants" that are more human-readable too)
You could even export this with Data Loader, you just have to start the wizard on Order Product history table. But you can ignore the whole query creator and paste a query you've created.
Admin way
Have you ever created a report in Salesforce? There are self-paced trainings (for Lightning and Classic UI) and tons of YouTube videos. Get a feel of making few reports.
What you want might be doable with built-in report type (see if there's new report -> order product history). If nothing exciting - as admin you can make new report type in setup. For example Orders -> Order Products -> Order Product History. Screenshots from here might help.
Just wanted to update this for anyone looking for a solution in the future.
Turns out you can traverse these as a parent-child relationship in the SOQL query. Here's the query I ended up using:
SELECT CreatedBy.Name, FORMAT(CreatedDate), OrderItem.Order.OrderNumber, OrderItem.Product2.Name, OrderItem.Product2.ProductCode, Field, OldValue, NewValue
FROM OrderItemHistory
WHERE (Field = 'Fee__c' OR UnitPrice) AND (CreatedBy.Name != 'Integration User') AND (Created Date >= 2020-11-24T00:00:00.000Z) ORDER BY CreatedDate DESC

Set up relation on two existing Salesforce objects

I have a custom object in Salesforce which I need to setup a Master Detail relationship from Accounts. Accounts being the Master and CompHist being the Detail. The problem I am running into is that I need to set the relation to work off of custom fields within the objects. Example:
1.) Accounts has a custom field called CustomerId.
2.) CompHist also has custom field called CustomerId.
3.) I need to be able to have this linked together by CustomerId field for report generation.
About 2,000 records are inserted into CompHist around the 8th of each month. This is done from a .NET application that kicks off at the scheduled time, collects info from our databases and then uploads that data to salesforce via the SOAP API.
Maybe I'm misunderstanding how Salesforce relationships work as I am fairly new (couple months) to salesforce development.
Thanks,
Randy
There is a way to get this to work without triggers that will link the records or pre-querying the SF to learn Account Ids in .NET before you'll push the CompHistories.
Setup
On Account: set the "External ID" checkbox on your CustomerId field. I'd recommend setting "Unique" too.
On CompHist: you'll need to make decision whether it's acceptable to move them around or when the relation to Account is set - it'll stay like that forever. When you've made that decision tick / untick the "reparentable master-detail" in the definition of your lookup / m-d to Account.
And if you have some Id on these details, something like "line item number" - consider making an Ext. Id. for them too. Might save your bacon some time in future when end user questions the report or you'll have to make some kind of "flush" and push all lines from .NET (will help you figure out what's to insert, what's to update).
At this point it's useful to think how are you going to fill the missing data (all the nulls in the Ext. Id) field.
Actual establishing of the relationship
If you have the external ids set it's pretty easy to tell salesforce to figure out the linking for you. The operation is called upsert (mix between update and insert) and can be used in 2 flavours.
"Basic" upsert is for create/update solving; means "dear Salesforce, please save this CompHist record with MyId=1234. I don't know what's the Id in your database and frankly I don't care, go figure this out will ya?"
If there was no such record - 1 will be created.
If there was exactly 1 match - it will be updated.
If there were more than 1 found - SF won't know which one to update and throw error back at you (that's why marking as "unique" is a good idea. There's a chance you'll spot errors sooner).
"Advanced" upsert is for maintaining foreign keys, establishing lookups. "Dear SF, please hook this CompHist up to Account which is marked as "ABZ123" in my DB. Did I mention I don't care about your Ids and I can't be bothered to query your database first prior to me uploading my stuff?"
Again - exact match - works as expected.
0 or 2 Accounts with same ext. id value = error.
Code plz
I'd recommend you to play with Data Loader or similar tool first to get a grasp. of what exactly happens, how to map fields and how to not be confused (these 2 flavours of upsert can be used at same time). Once you'll manage to push the changes the way you want you can modify your integration a bit.
SOAP API upsert: http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_upsert.htm (C# example at the bottom)
REST API: http://www.salesforce.com/us/developer/docs/api_rest/Content/dome_upsert.htm
If you'd prefer an Salesforce Apex example: Can I insert deserialized JSON SObjects from another Salesforce org into my org?

Get merged account IDs

I am about to do the process of mass de-duping in Salesforce. However, our team uses excel spread sheets where they have Account IDs. When I will merge accounts, then some of them won't exist in Salesforce anymore. I would like to get merged Account IDs to use vlookup in Excel, to replace invalid values.
I tried to pull this data out via Account History report... I wasn't able to do this. Also I went to Recycle Bin, where deleted Accounts are stored. However, there I can find only Account names instead of Account IDs
Does anyone know how can I get the merged Account IDs?
You could use some screenscraping thingie to inspect the HTML of Recycle Bin page. The Id of deleted record is hidden in the checkbox you click.
<input id="ids0" name="ids" onclick="..."
title="Select Sample Account" type="checkbox" value="001xxxxxxxxxxxx">
But that's a very crappy solution.
Better would be to use an API tool (I usually recommend Real Force Explorer but if it's an one-time action the web-based workbench.developerforce.com might do too).
http://www.salesforce.com/us/developer/docs/api/Content/sforce_api_calls_merge.htm
To find all records that have been merged since a given point in time,
you can use queryAll() with a SELECT statement similar to the
following:
SELECT Id FROM Contact WHERE isDeleted=true and masterRecordId != null
AND SystemModstamp > 2006-01-01T23:01:01+01:00
In your case something like this should give you both old and new Id - perfect for mapping in Excel!
SELECT Id, Name, MasterRecordId, MasterRecord.Name
FROM Account
WHERE isDeleted=true and MasterRecordId != null
Use a soql query tool or apex with soql query. The old accounts should be there and marked with IsDeleted true
I work on Mac and use SOQLExplorer
You can also use th SF Workbench. Log onto SF and under your name look for it

Joomla! - Database tables related with users

I wanna make my own registration form as i need to include extra fields for the users. And it seems that there isn't any FREE extensions that is able to do it. So i have to find out how to insert the users into the database.
I have found out that there are 3 tables related with each other when creating a new user:
1. jos_users
2. jos_core_acl_aro
3. jos_core_acl_groups_aro_map
But i am running Joomla! 2.5.1 for my website and my database does not have jos_core_acl_aro and jos_core_acl_groups_aro_map tables!!
May i know what are the tables to take note of when i'm doing my own registration form?
Thanks in advance!
What you want is actually two things:
Your own registration form
add fields to jos_users
If you're looking for a plugin for the registration form:
http://extensions.joomla.org/extensions/clients-a-communities/user-management/13753
Steps to add fields for jos_users you can find here:
http://forum.joomla.org/viewtopic.php?p=2654947
You have to add an entry to #__user_usergroup_map, the 2nd field "group_id" must exist at #__usergroups.

Resources