NetSuite Workflow - Set Field Mandatory Option - netsuite

I am creating a NetSuite workflow to set a field mandatory. Use case as follows:
If custom field "Customer Has Billing Issue" checkbox is checked, then make "Billing Issue Ticket Number" (custom field) mandatory.
Settings as follows:
Workflow:
Name: (any)
Record Type: Customer
Sub Types: Customer
Execute as admin: checked
Status: Released (in Sandbox)
Event definition: On create, on view or update
Trigger type (I've tried all): Current set to Before Record Load
State:
Action 1: Set field Mandatory:
Condition: Company has billing issue = T
Trigger on (I've tried them all) currently on: After field edit
Triggering Client fields: Customer has billing issue
Parameters: Field: Billing Issue Ticket Number
Mandatory = Checked
Action 2: Set field Mandatory:
Condition: Company has billing issue = F
Trigger on (I've tried them all) currently on: After field edit
Triggering Client fields: Customer has billing issue
Parameters: Field: Billing Issue Ticket Number
Mandatory = Unchecked
I tried all combinations. The workflow is triggering but I cant seem to make the field mandatory. Any suggestions?

I got it to work like this. Actions have the "Customer Has Billing Issue" field as the triggering field

Related

Change default PO form for a role based on condition

I have a requirement where I need to default certain fields on the PO form if the particular PO is created from MRP. I have created a summary field which will result data if the PO is created from a planned order. Now I need to default certain fields only for a role in this case. I was thinking of creating another custom form and defaulting all the fields using a workflow and call it only when the summary field has a value. The defaulting should not happen in other cases.
Please advice on the best approach on this, I am not much proficient in scripting yet.
Thanks
You can do this either via script or workflow,In case of a workflow default the values of the fields with the condition of your summary field and the role.If you want to do it in script something like this will help you
var userObj = runtime.getCurrentUser();
log.debug("Internal ID of current user role: " + userObj.role);
var userObj = runtime.getCurrentUser();
log.debug("Custom script ID of current user role: " + userObj.roleId);

Error while inserting Journal Transactions

I am trying to create a Journal Transaction of AR module from Shipment screen with new button, on this new button click, it should create Journal Transactions document with credit amount in one account and debit amount in one account, These two accounts are configured in shipment screen only. but am getting below error. I am passing Project and all the other mandatory field values from code.
Error: Inserting 'GL Transaction' record raised at least one error.
Please review the errors. Project is Required but was not specified. Account '40000' used in the GL Transaction is mapped to Project Account Group.
You need to either pass in the project from the shipment (if the journal transaction should hit the project) or pass in the default non project value.
for example if not setting the project from the shipment you can set your project field on the journal lines using the following:
myInTran.ProjectID = ProjectDefaultAttribute.NonProject();
If you are pulling the project from the shipment you need to set the journal tran lines for the ProjectID, TaskID, & CostCodeID fields.
Depending on the version of Acumatica you are using, you might not have CostCodeID. I think it was added in 2018R1.
If using the Non project value, the TaskID and CostCodeID are not required.

User event Before Submit doesn't work in case of automatic PO creation (NETSUITE)

Is it possible to restrict the purchase order created automatically like when any dropship or special offer item selected in sales order?
I can confirm as of very recent discussions and testing with Netsuite that before submit does not trigger on automatically generated purchase orders.
We have an approvals system in place and were hoping purchase orders could be auto generated and stay pending supervisor approval but this is not possible as the before submit does not trigger.
An enhancement request has been raised by Netsuite for this functionality.
The behaviour of dropship and special order items is dependent on a checkbox. If you clear the checkbox when the order is approved then the automatic POs will not be created.
Checkbox clearing may be done by the user or may be done via a Before Submit user event script on the Sales Order.
If the need to restrict PO creation has something to do with PO vendor characteristics where you may also need to restrict general PO creation then you should extract the vendor check to a library file. that way it could be used in the SO beforeSubmit to clear the createpo flag and the PO beforeSubmit to throw an error.
You could also use the PO After Submit "specialorder" or "dropship" events to check the PO vendor after submit and delete the created PO.
However given your explanation in the comments the SO shouldn't be able to be approved. i.e. why take a drop ship order where the components are not orderable?

Is there a way to make an online customer tax exempt?

In Ubercart, Is there a way to make an online customer tax exempt and if so, how? I have tried creating a role called 'tax_exempt' and editing the conditions so that this role does not apply to the tax (admin/store/ca/uc_taxes_1/edit/conditions), but when I go to the checkout page, it is still calculated taxes for this user (I have added them to the tax_exempt role)
Here is the condition setup:
Operator: AND
Condition: Check an order's billing State/Province
State/Province: New York
Condition: Check the role of the user.
Negate this condition = true
Operator: OR
Roles: tax_exempt, wholesale
I had to go into admin/store/ca/ and enable the tax trigger for it to work

SharePoint Issue Tracker - auto approve if in a group and auto set of 'source'?

SharePoint 2007
I've setup and Issue Tracker as a quick ticket system. I gave everyone in all the internal domains access to view the page and to create items, then I made a list of team members and gave them rights to edit/delete items (etc).
The Issues all have a "pending/approved" column and a radio button selection on the new issue form to choose between "internal" or "external" issue (if a core team member created the issue or someone from the outside).
I'm not sure if it's possible but I've been trying to figure out how auto set the internal/external radio selection (if the person creating the issue is on the list of core team members - auto set 'source' to 'internal' else 'external'. And I've also been trying to figure out how to auto-approve items if they are internal items.
So, if someone on the team member group list creates an issue it should be automatically have it's source set to "internal" and it should be auto-appoved.
Thanks for any help!
One solution would be to use SharePoint Designer like this:
Customize the NewForm.aspx to remove the internal/external field altogether from the initial creation.
Create a new workflow on the list that automatically starts when a new item is created.
Use the condition "Created by a specific person" and choose the created by to be the Team Members group
Set the action to "Update List Item" and set the Internal/External field to internal
Add an additional action of "Set Content Approval Status" and set it to Approved
Click the "Add 'Else If' Conditional Branch" link
Add an action for the Else condition of "Update List Item" and set the Internal/External field to external
The first step is just for appearance (since regardless of what they choose you will be setting it for them automatically). The workflow will take care of auto setting your fields based on the creator's group membership.
You need an event receiver that fires on ItemAdded (http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.spitemeventreceiver.aspx) that sets both Source depending on the user that posted the issue and approves if source is internal.

Resources