NetSuite System Notes CASE formula returning all notes - case

I've added a formula(date/time) column to a saved search in NetSuite, to return a system notes' date.
My CASE formula is returning all the system notes row's, and I would like a specific row's date i.e. 'POP Host Int ID' date.
How can I specify the row to return the date from, or remove the rows with no date that are not relevant?
CASE
WHEN {systemnotes.field} = 'POP Host Int ID' AND {systemnotes.type} = 'Set'
THEN {systemnotes.date}
ELSE NULL
END
It appears that my WHEN logic works to identify the record's system notes do contain an entry for 'POP Host Int ID' but in THEN I'm not specifying which row to get the date from so it returns all rows. And I could be wrong on this part.
Example results
Example System Notes for 1 record
Thank you for your assistance.

The CASE statement doesn't determine which rows are returned, only what data is returned for that field. On the other hand, the reference to the systemnotes table creates a join that causes each record result to be repeated for every system note entry.
To avoid this, add {systemnotes.field} = 'POP Host Int ID' and {systemnotes.type} = 'Set' as Filters in the Criteria tab instead of in the WHEN conditions. You can then just add the field under results instead of needing a formula.
Edit in response to comment below:
In cases where you need one result per base record (user), but they don't all have valid values from the joined table (system notes), I'd suggest grouping the results by user, and using aggregation functions for all the columns. EG: For the column in question I'm assuming you are getting one valid result and a lot of blanks per user. If you group by user and set the Summarize function to MAX, you should just get one result where the valid value is returned. If no valid value exists from the system notes, you would still get a result from the user and that field will be blank.

If you are creating a saved search the place to do this is in the criteria section.
The views you've shared are for the System Notes pertaining to a single record.
For those views you could just use the Field selector in the Filters section to select your POP Host Ing ID field.
For a saved search you would use the Advanced view and scroll down the criteria field list. Near the bottom are the System Notes. You can filter on Field, Date etc

Related

DynamoDBVersionAttribute for a frequency field

I have a DDB table, 4 attributes, key (PK - a string), date (sort/range key), status, frequency.
I have multiple clients that will write to this table based on the 'key' and date value
I want to increment frequency every time a client makes a write.
Can I just use DynamoDBVersionAttribute on an int field and use this as a proxy for frequency?
I understand this is not meant for this use case, but I want to avoid having to first read and then write the item. Any thoughts?
Since you're already doing an update expression, just add an ADD action to increment the frequency by 1. The ADD action doesn't need to know the original value to increment it.
See the example from the docs here:
https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/Expressions.UpdateExpressions.html#Expressions.UpdateExpressions.SET.IncrementAndDecrement

If it is possible, how do I create a custom field containing a document number on NetSuite in a saved search?

In NetSuite, I am setting up a new (currently untitled) saved search that is meant to display three columns simultaneously: Invoice document number, Sales Order document number and Item Fulfillment document number.
I have configured my transaction saved search to display invoice document type. Sales Order document number is called Created From which is a NetSuite-created field and displays normally as desired.
There is a field called Document Number, unfortunately it responds closely to the criteria setting whether document types are set to Invoice or set to Item Fulfillment. Setting both does not meet my desired output.
I believe there is a way to somehow have all three document numbers present in the same saved search as their own unique columns.
While editing the saved search, I have attempted to create a new column called "Formula (text)" which is a field containing the formula {number}, this column appears as a second Invoice document number instead of the desired Item Fulfillment document number.
While editing the saved search, I have also tried another "Formula (text)" field containing the formula {tranid} which also results as another Invoice document number column instead of the desired Item Fulfillment document number.
Result of both above attempts: https://i.ibb.co/KyDP7Z5/2019-06-12-13-55-58-Window.png
I tried going to Customization > Lists, Records & Fields > Transaction Line Fields to create a new custom field, containing the above as defaulted formulas. The result is exactly that of the above image.
I tried going to Customization > Lists, Records & Fields > Transaction Body Fields to create a new custom field, where the content is referenced by another Saved Search. I expected that if I can pick the document number column from the "item fulfillment lookup" saved search, then that would appear as a separate column bearing the Item Fulfillment number.
I marked the document number column inside the "item fulfillment lookup" saved search as the summary type: "group" as well as give this saved search "Document Number" as an available filter in order for the "item fulfillment lookup" saved search to appear for custom columns.
Unfortunately, this yielded an empty blank column.
I know and I admit that I am doing something incorrect and would much appreciate it if there is an alternative solution or workaround to achieve this desired objective (all three document numbers to appear in a single saved search).
In your saved search Columns, at the end of the drop down list where you choose the columns, you can choose related records fields.
You didn't say which record your search is based on, but assuming your search criteria is on Sales Order, then you can use the following:
To get the related Item Fulfillment:
Fulfilling/Receiving Transaction Fields ... and then choose Document Number
To get the related Invoice:
Applying Transaction fields ... and then choose Document Number

Internal : Collection fields are defined but cannot be matched to the incoming collection - in blueprism

I want collect Financial historical data from NASDAQ link https://www.nasdaq.com/symbol/ge/historical. In this I am spying date element and using "get table" I can get whole table data for date, open, high,... which I am putting in collection but the thing is I am not able to give column name to collection. I made 6 field for each all 6 column you can see in image attched. But when i run the programv I get an error "Internal : Collection fields are defined but cannot be matched to the incoming collection - The collection definition does not contain the field Column1". if I dont add field I get data in collection which has default column name column 1, column 2, ...column 6 . But I want to have their specific column name. I think the problem is with the data type I am using while creating field in collection. I tried different combination for the data type but still...Please help me on that. enter image description hereimage 1image 2
image 3image 4
The error is exactly as it says; the fields cannot be matched; in other words, the fields should match. Since you get default field names from the Read stage, then you should either rename the fields before passing the collection to the process or have the collection receiving the collection at the process level have no fields defined (it will get the headers defined from the object and you can rename the fields after that, or just use the default column names, but that's not practical).
To rename the fields, you can use the default object "Utility - Collection Manipulation", either actions "Rename Collection Fields" or "Rename Field".
Rename Collection Fields
You will have to supply the collection containing the read table (Main Collection) and a collection containing the same headers as the collection containing the read table (New Headers), and in the first row, the new headers (it was designed like that, it's not that intuitive; it took me a good while to figure it out). The collection New Headers should look like the below:
Rename Field
For this one, you will need to loop over each header. Collection In will be the collection containing the read table, and you insert each header to change one at a time. (e.g. first loop iteration will have Column1 as Field Name and date as New Name, second loop iteration will have Column2 and open, etc)

check duplicate values in oracle forms multi record block

What I wanted is to display an alert when I move to the next row if the record that I inserted is already one of the records in the multi record block.
and in what trigger must I put it?
There are several options you can use.
One is to POST values entered (in WHEN-NEW-RECORD-INSTANCE) trigger. It will, well, post everything you entered so far. Then, you can write a WHEN-VALIDATE-ITEM trigger which SELECTs from that table and checks whether such a value already exists. Alternatively, if there's the UNIQUE CONSTRAINT on that (those) column(s), database will do its job itself, i.e. raise an exception.
Another option is to literally loop through all rows in a block and compare the first row's value with all the others, then the second row's values with all of them, etc.
Or, you can use a Record Group (usually used for Lists of Values). Basically, you'd check whether value you entered exists in a record group. More info, along with a FMB file, on Craig's blog.
Or, you can use calculated items, as described enter link description here (FMB attached as well).
As you can see, quite a few ways to do that; explore each of them and pick the one you find the most useful / attractive / easy to implement.

How to describe (enumerate) picklist enties valid for a specific record type in Salesforce?

In apex code I want to enumerate the legal values for a picklist field. To do this I can just call Account.Foobar__c.getDescribe().getPickListValues() and I've got a list of Schema.PickListEntry values.
However it's possible to setup multiple record types for a given sObject. For example Account might have "Manufacturer", "Distributor" and "Retailer" record types. In the Salesforce setup it is possible edit (limit) the picklist entries for each field based on record type. So Retailer type accounts might only use a subset of the picklist values for the Foobar field.
So basically I want Account.Foobar__c.getDescribe().getPickListValues('Retailer') however this is not the syntax. The validFor method looks promising, but it seems like it is only for field dependent picklists - a picklist filtered only by record type returns false for isDependentPicklist.
I know this is an old post, but maybe the info below will help someone who still needs the answer.
I found here that one can actually get a list of record type specific picklist values by making a describeLayout() call.
Using your example (C#):
DescribeLayoutResult result = binding.describeLayout("Account", new string[] { "01230000000xxXxXXX" } );
PicklistEntry[] values = result.recordTypeMappings[0].picklistsForRecordType[12345].picklistValues;
Replace "01230000000xxXxXXX" with a RecordTypeId of your Retailer record type object. Use the query "SELECT Id FROM RecordType WHERE Name = 'Retailer'" to get the value.
Replace 12345 with an index of your picklist object that you would like to get values of.
You can't do it in pure Apex AFAIK, unfortunately. The metadata API does expose it.
Related opinions: http://boards.developerforce.com/t5/Apex-Code-Development/Any-way-to-obtain-picklist-values-by-record-type/td-p/287563

Resources