NetSuite Marketing Campaign - Custom Event Fields - Show values in Marketing Templates - netsuite

I have a scenario where I want to create a dynamically branded marketing template.
The setup:
In my Brand (Class) list i have added several custom fields (ie. Header Image URL, social links etc...). These are stored fields/
In my campaign record I have a Campaign Event custom field where I can select the brand for each campaign event (custrecord_campaign_event_brand).
Last line (actual brands censored for privacy) was used for testing.
However it seems during the merge, there is nothing in these fields even though i can see the data in the event list on the campaign.
Currently using campaignEvent.custrecord_campaign_event_brand within the advanced PDF template.
Note, when looking at the Customer Group used to generate the merge, it does not show the value I selected on the campaign event.
Current holding my breath for a NetSuite support ticket as well.

According to the NS docs a standard campaign email template cannot reference anything from the campaign except the coupon code.
I don't know if the standard beforeLoad event is emitted for Campaign emails but what I have sometimes had success in adding fields to the standard email templates by using a beforeLoad script on customers that sets values for non-stored custom fields.
Your user event script might need a configured reference for the current campaign but playing with that concept might get you what you need.

Related

In Acumatica, using #me inside Relations Section of Generic Inquiry

We want to have a sales order dashboard where we only show orders for certain sales people based on the logged in user. For example, we have sales people BB and CR who share an assistant TP. BB can see his orders on the dashboard. CR can see his orders on the dashboard. TP can see orders for both of them on his dashboard. We also have people outside of sales who need to see all orders. We want to do all of this without having to create a bunch of custom dashboards. We wanted to maintain 2 dashboards - one filtered one for sales people and one unfiltered one for everyone else.
We have gotten close to solution by using a generic inquiry. We created custom fields on the salesperson that point back to a logged in user (UserID1 and UserID2). Multiple custom fields were used because a single sales person could be visible to 2 people. We then joined SOOrder to SalesPerson inside our GI. We then wanted to join the Users table on (SalesPerson.UserID1 = Users.PKID AND SalesPerson.UserID1 = #me) OR (SalesPerson.UserID2 = Users.PKID AND SalesPerson.UserID2 = #me). That would allow us to create a filter where Users.PKID is not null to limit the view for sales people and then not use any filter on the non-sales dashboard.
The problem is that #me is not available on the Relations section. It is only available on the conditions section. We tried to just have the join of SalesPerson.UserID1 = Users.PKID or SalesPerson.UserID2 = Users.PKID and then creating the condition for the #me portion. The issue there is that it only shows records with a match. That won't work for non-sales people.
Is there some way to include #me or an equivalent on the relations tab? Any better way to accomplish this?
Built-in variables like '#me' aren't well documented which raises questions about support of this feature.
Try this instead:
In generic inquiry TABLES tab, add table 'PX.Data.AccessInfo'.
In PARAMETERS tab, add a new parameter (ex: 'P1') and set the Schema Field value to 'Accessinfo.UserID' (use 'Accessinfo' or the alias for that table declared in TABLES tab).
In the RELATIONS tab in the join condition Child Field you can reference the '[P1]' variable.
Accessinfo DAC contains current record of the logged in user and reflects the information you see when you click your profile in the top right of Acumatica pages. If the solution doesn't work right away you can debug it with the Request Profiler page to look up the generated SQL query for the GI.

Netsuite Invoice and Item Fulfillment

After surfing the web for more than 3 months, most of the problems that will face NetSuite users are related to Item Fulfillment. I want to know what is the relation between the Invoice and Item Fulfillment.
Invoice will not be created until we fulfill the order, so, there must be a relation between Invoice & IF.
But unfortunately, I cannot get at least Item Fulfillment Order #.
Our Customers are asking to include the Number in the Invoice, but, there is no relation between the 2 records unless one field which is (created from) and this field is getting the Sales Order Number and it is useless to us, since we may issue from one sales order many Item Fulfillment Transactions.
Could anyone suggest any help or hint on how to reach Item Fulfillment # from Invoice Record?
Thanks a lot
There is no system link between an Invoice and an Item Fulfillment.
Sales Orders are linked to one or more Item Fulfillments, and one or more Invoices, but as far as NetSuite is concerned there is nothing connecting any specific fulfillment to any specific invoice. In fact you could have products from multiple fulfillments that are invoiced together, or vice versa, a single fulfillment with multiple invoices.
If you want to store a link between the two documents you would need to customize this yourself using scripting and a custom field.
functionally it is possible only if the policy goes by One SO-One IF-One Inv.
Else you may need to look for scripting.

Netsuite System Notes for Contract Items

In NetSuite, I am trying to create a Saved Search report that shows field changes to individual contract line items. I will be using this report to reconstruct historical data, including pricing and quantities.
I have a Transaction Saved Search that shows me each contract and every contract line item. I have tried to include System Notes fields to pull in the field history, but it is only able to show me System Notes for the overall contract record (not the individual line items).
I also tried creating a System Notes Saved Search, which pulled the details I was looking for, but does not show me the Internal ID of the record (it shows me the "Record", which appears as a string - ex: "Contract #12345"). It also does not show me the ID of the contract line item, so even if I am able to join based on the Contract ID, I don't know which line items were affected.
If I navigate to the contract in NetSuite and look at the Items list, I am able to click the "History" button to see a list of changes - this is the information I am trying to pull. Is there any way to do this through a Saved Search?
Transaction item sublist history, is not yet exposed on the saved search/suitescript.
There might be an enhancement request for this use case.

Display Customer Activity Notes on Sales Order After CustomerID entered

I have a request from a pop up of the Customers Activity Notes after the Customer ID has been entered on a sales order. Currently they have set up specific instructions for entering an order for customer (could be different for each customer). We have entered them under the customers Activity Notes with a specific ID in the subject field. The notes will be in the body of the activity.
Rather then copy this info to the Sales Order Activity Notes, they would just like to display the Activity Notes from the Customers Activity Notes.
Has anyone done something like this or have any though as to how this could be accomplished.
You could proceed one of two ways:
First way is you could create a button in which it would fetch the associated customer's notes and display them.
The second way is that you could override the PXSelecting action for the page and make sure the Customer ID selector has commit changes set to true.
Either way you go, you will need to fetch the notes using the customer's NoteID field from the Note table. One method would be:
BAccount cust = PXSelect<BAccount, Where<BAccount.bAccountID, Equal<Current<SOOrder.customerID>>>>.Select(Base);
Note custNote = PXSelect<Note, Where<Note.noteID, Equal<Required<BAccount.noteID>>>>.Select(Base, cust.NoteID);
This should get you the result you desire. You can then display it however you choose.
NOTE: Please let me know if there are any syntax errors and I will correct them ASAP.

Netsuite Online HTML Form- Is there a way to map current customer fields to online form?

I have created an online form to email to current customers so they can update their billing information.
The problem is when I try to include the current field values so the customer can update the fields based on whether or not the current values are correct, the form does not allow for two values for same field to exist on the form.
Is there a way to add the current field values and leave a blank text field on netsuite online forms?
Thanks!!!
You can add the values from the customer as part of the query string but the standard form will render those as fixed, non-editable fields.
What I do is pass in the customer id, an expiration timestamp and a hash of the id, expiration and a secret key.
Then I use a custom template for the form. The template includes a script that passes the id, expiration and hash to a suitelet. The suitelet validates the hash and if the time is not past the expiration will return customer values as a JSON object. The form's script will then populate the customer fields with current values that the customer can then update.
Not fool proof but it does put security in the hands of the customer. To increase security you can make the expiration duration short and have your suitelet offer to send a new email link to the customer's registered email address.
What I actually try to do (depending on whether you are asking the customer to respond or whether the customer has reason to respond) is to route the customer to a category page that requires login. Then I just build my form from scratch and have the backing suitelet accept the form post as well. The form posts into an iFrame and the result uses postMessage to report status/completion etc. This is way more secure.

Resources