Number of fields in the field set - salesforce

In a salesforce how many fields we can add in the field set??
I just want to know how many fields we can add in the Salesforce field set?? I have checked many sites but I don't get a proper answer for this question.

Related

NetSuite - UNION ALL equivalent in saved search?

I'm in the process of writing a SuiteTalk integration, and I've hit an interesting data transformation issue. In the target system, we have a sort of notes table which has a category column and then the notes column. Data going into that table from NetSuite could be several different fields on a single entity in NetSuite terms, but several records of different categories in our terms.
If you take the example of a Sales Order, you might have two text fields that we need to bring across as notes. For each of those fields I need to create a row, with both the notes field in the same column but separate rows. This would allow me to add a dynamic column that give the category for each of those fields.
So instead of
SO number notes 1 notes 2
SO1234567 some text1 some text2
You’d get
SO Number Category Text
SO1234567 category 1 some text1
SO1234567 category 2 some text2
The two problems I’m really trying to solve here are:
Where can I store the category name? It can’t be the field name in NetSuite. It needs to be configurable per customer as the number of notes fields in each record type might vary across implementations. This is currently my main blocker.
Performance – I could create a saved search for each type of note, and bring one row across each time, but that’s not really an acceptable performance hit if I can do it all in one call.
I use Saved Searches in NetSuite to provide a configurable way of filtering the data to import into the target system.
If I were writing a SQL query, i would use the UNION clause, with the first column being a dynamic column denoting the category and the second column being the actual data field from NetSuite. My ideal would be if I could somehow do a similar thing either as a single saved search, or as one saved search per entity, without having to create any additional fields within NetSuite itself, so that from the SuiteTalk side I can just query the search and pull in the data.
As a temporary kludge, I now have multiple saved searches in NetSuite, one per category, and within the ID of the saved search I expect the category name and an indicator of the record type. I then have a parent search which gives me the searches for that record type - it's very clunky, and ultimately results in far too many round trips for me to be satisfied.
Any idea if something like this is at all possible?? Or if not, is there a way of solving this without hard-coding the category values in the front end? Even if I can bring back multiple recordsets in one call, that would be a performance enhancement.
I've asked the same question on the NetSuite forums but to no avail.
Thanks
At first read it sounds like you are trying to query a set of fields from entities. The fields may be custom fields or built in fields. Can you not just query the entities where your saved search has all the potential category columns and then transform the received data into categories?
Otherwise please provide more specifics in Netsuite terms about what you are trying to do.

Salesforce Lookup Object Relationships

I have a number of objects that contains references to other objects in Salesforce. An example is that a Shipping is the parent object related to ShippingItem by the shippingId. In order to save ShippingItems I need to get the ShippingId of the Shipping object. Also, the ShippingItems are related to ShippingMethod object which contains the shipping methods, UPS, FEDEX etc. This is a picklist type that allows users to pick the shipping method. In order to create/save the ShippingItem. I need to obtain all the related fields, i.e. ShippingMethod i.e UPS, ShippingId to which it is related and other similar information. How can I obtain these fields in order to save the ShippingItems? When I inspect the Objects, I am unable to determine the fields to query in order to obtain the related information.
Please help
If I understood this correctly, ShippingItem has a lookup to Shipping and a lookup to ShippingMethod. Are you providing a UI where people create ShippingItems? If yes then ShippingID and ShippingMethodID should be populated on the shipping record when you get the record back in controller.
If your question is how to provide a list of ShippingMethod records on the UI for users to select, you can query the object records separately and create a picklist for the user to choose.
Adding a little more information or code snippet will help you get better answers.

Difference between Standard Fields and Custom Fields in Salesforce

I am kind of new to Salesforce. Could you please let me know what is the difference between Standard Fields and Custom Fields in Salesforce? Can I consider combination of Standard Fields as the unique identifier for a record?
Custom fields are just that. Fields that have been added to the standard Salesforce schema to tailor the data for each object. The user who creates the field can specify the field type and any applicable limitations, such as the maximum number of characters in a text field. These fields might be added to an Org via a managed package or through direct customization.
Standard fields in contrast are those that are already present in the Salesforce schema when a new Organization is created. They are present in all Orgs where the same features are enabled. You can't customize these fields to the same degree. E.g. you could change the display label, but not the underlying API name or data type.
You can see the list of the standard fields in the Salesforce Field Reference Guide
From an API perspective, custom fields are usually identified by a __c suffix (there are a few exceptions, such as GeoLocation fields).
Can I consider combination of Standard Fields as the unique identifier for a record?
You would usually rely on the Id field to be unique. If you wanted to augment this with another unique value, you would create a custom field and mark it as an External ID.
A composite key isn't directly supported. Instead you need to create a Unique Text field and then use a workflow field update or before trigger to populate the unique field with the components of the composite key.
Incidentally, the salesforce.stackexchange.com site is a great place to ask Salesforce specific questions.

Salesforce - Search display using two custom objects

I have created 2 custom objects - 'user details' and 'salary'.
In user details I have this field employee id. If I am searching for some user by entering its employee id,I want to display the salary details of the user in the search table too.
As I am new to salesforce.com, can anyone please give me the code for this??
I think there are 2 ways you could do this.
Create a formula in the user detail to bring the value of the salary from the salary object.
formula may look something like this.... (depending on your objects set up)
salary__r.Salary_Value__c
then in the search results, just include the Salary__c field in the user details object
or
create a visualforce page that will make a soql query and bring the values to be displayed on the page in a repeater.
The former is the easier option, the latter gives you more flexibility and customization.

Order data using values stored in another table

I've been using cakephp for a while, but have not learned all the ins and outs yet so I may be missing something simple. Or the problem may lie with my database structure. Either way, if anyone has any idea of what I'm doing wrong, please share.
Is there a way to order the data returned by cakephp's find using values stored in another table?
I am creating custom form fields on a per category basis, so when I choose a particular category to post in, custom fields will be added to my form. I have 3 tables: Posts, Fields, and Answers. The Posts table stores the basic static information for the post, such as id, category_id, title, and description. The Fields table stores the custom field data, such as category_id, field_label, field size, etc. The Answers table stores the values that are entered for particular fields, such as post_id, field_id, value.
I am trying to display the posts for a particular category, and create html table headers on the fly, using select fields, set by a column toggle in the fields table, and also select the answers associated with that particular field and post.
I am able to select all the data I want, and paginate everything just fine, but what I can't seem to figure out is how to order the data using one of the dynamic column values. For example, if I have year, make, and model as 3 custom fields, I would like to click the year column to sort my results by the year values, and if I click the make column, I would like to sort my results by the make values, etc.
I know how to order the results by a particular field inside the posts table, such as id or title, but is it possible to order using the custom fields? Am I setting up the database and/or something else wrong, and if not is there are particular cakephp method or sql command that I need to use in order to sort by the custom fields? I'm not really well versed in complex sql commands.
Thanks.
I'd suggest you pass the field name and sort direction in the URL (GET param). So when you have your table header link, form it so that it links to a URL as so:
http://somesite.com/pages/index/sort:customfield1/dir:asc
Then when you're grabbing the data from the db in your find() query, include the named parameters as the order parameter that can be sent to find.
You'll need to determine a default sorting column and direction. Maybe have that be selectable with a boolean field in the schema -- if there are no parameters sent to the action above, pull the field from your other table that has default set to true in the record.
To clarify: when a user visits a given action, first you'll pull the custom fields from the other table. Then using those fields (either the default as mentioned above, or the named params passed in the URL) form the query for the actual data, using the order parameter.

Resources