I need a way to find internalIds of contactRole in netsuite - soap

How do we get the internalId of contactrole in netsuite. I am basically trying to add a contactrole as part of contact attach to a customer record. I need to fill in the internalId attribute for contactRole below to add the proper contactRole. But I am not able to search for the internalIds of existing contactRole from the netsuite UI. Any help appreciated. Snippet Below.
<soapenv:Body xmlns:sales="urn:sales_2018_2.transactions.webservices.netsuite.com">
<urn:attach>
<urn:attachReference xsi:type="core:AttachContactReference">
<core:attachTo internalId="1298" xsi:type="core:RecordRef" type="customer" />
<contact internalId="1307" xsi:type="core:RecordRef"/>
<contactRole xsi:type="core:RecordRef"/>
</urn:attachReference>
</urn:attach>
</soapenv:Body>

here is where it can be found on netsuite UI. Setup-sales-CRM Lists

Related

Vue validation with Vuetify

I'm working with a form done using Vuetify and my question is, how can I add a success attribute to the v-text-field once the input has been validated by the :rules?
<v-text-field
v-model="halfPayment.month"
v-mask="'##'"
:rules="[$rules.required, $rules.minCharacters(2), $rules.between(1, 12)]"
label="month expired"
outlined
dense
:success=
background-color="white"
/>
You can add
:success="!!halfPayment.month"
to the text field to show when it successfully passed the validation rules.
I hope this helps, otherwise, you can just drop a comment!

How can I query delll boomi MDH field thats not in match rule?

I am new to MDH and I would like to know how to query MDH field directly thats not in match rules.
I have a model that has 5 fields (Src_id, name, email, updated_date, created_date) and we have a match rule on Src_id which is also ID in MDH.
But, I would like to search on name and get the Src_Id is it possible? if not, do I need to make any changes to my model
Any help is highly appreciated.
There are two avenues for "querying" your master data hub.
MDH Web UI
Boomi MDH API
You say you would like to search "Name" and get "Src_Id". If you using avenue
(1) - you simply go to UI and select "Add Filter"->"Field Data"->select "Name"->select operator "Equals"->{fill in name you'd like to search for} --> The entire Golden Record is returned and you can see it via the UI or by clicking the timestamp to pull up the record in depth
(2) refer to https://help.boomi.com/bundle/hub/page/r-mdm-REST_APIs.html
specifically "Query Golden Record". You would fill in all the necessary API information (URL)+Basic Auth based on Repository+universe id-based on model, etc.
Your request body would look like:
<RecordQueryRequest>
<view>
<fieldId>SRC_ID</fieldId>
</view>
<filter>
<fieldValue>
<fieldId>NAME</fieldId>
<operator>EQUALS</operator>
<value>{INSERT NAME TO SEARCH}</value>
</fieldValue>
</filter>
</RecordQueryRequest>
Response will be in XML corresponding to your model: eg)
<RecordQueryResponse resultCount="1" totalCount="1">
<Record recordId="GUID" createdDate="TIMESTAMP" updatedDate="TIMESTAMP" recordTitle="DERIVED BY MODEL">
<Fields>
<rootelementname>
<src_id>123</src_id>
</rootelementname>
</Fields>
</RecordQueryResponse>

grails access form attributes in controller

In grails i have a form with g:field tags like:
<g:field name="test" from="0..20"/>
I am trying to find a way how I can access the "from" attribute in my controller.
I can get the "value" attribute by using:
print params.test
I have tried:
print params.test.from
I'm sure there must be a way to do this but I can not seem to find it.
What I am wanting to achieve by this is perform validation so that the value does not go outside the the from range.
I know that this can be added in the domain, but in my situation I need to allow the user to overwrite the range constraints.
Any ideas?
By the time that code hits the browser, it is just HTML. from doesn't exist anymore. If that is being rendered into some sort of client side validation, that's not going to get submitted back to the server in a form submit.
If you explain what you are really needing to do in your question, I can provide a better answer.
You can pass the "from" values as hidden fields.
<g:hiddenField name="min" value="0" />
<g:hiddenField name="max" value="20" />
Something like that.

Set request parameter in Orbeon

I am very new to Orbeon and XForms.
I have created a form with input field "BaseId"
<xf:input id="control-3-control" bind="control-3-bind">
<xf:label ref="$form-resources/control-3/label"/>
<xf:hint ref="$form-resources/control-3/hint"/>
<xf:help ref="$form-resources/control-3/help"/>
<xf:alert ref="$fr-resources/detail/labels/alert"/>
</xf:input>
and i want when i summit this form, in crud.xpl
method PUT i cant get value of BaseId through
<sql:param type="xs:string" select="/request/baseid"/>
Help me,please
Sorry for my bad English
The value of controls are passed to the persistence layer REST API in an XML document, as the body of the HTTP request. So in crud.xpl (say the one for eXist), this will be a document under /request/body. The exact path depends on your section and control name. For instance, if the section is named address and the field city, the value will be under /request/body/form/address/city.

what should my URLs look like for this simple REST web service?

I'm new to REST but I've built a simple web service and I'm having trouble finding a simple explaination of what URL format would be correct.
The service allows to create an invoice and push it through a series of simple approval phases.
(1) Read all invoices in an XML format:
GET: http://localhost/webapp/ws/invoices
(2) Read one invoice in an XML format (ex. invoice id = 555):
GET: http://localhost/webapp/ws/invoices/555
(3) Submit a new invoice:
POST: http://localhost/webapp/ws/invoices
With the invoice attributes ("userid", "totalprice", etc) are included like the POST parameters of a simple HTML form.
(4) Approve an invoice:
POST: http://localhost/webapp/ws/invoices/action
With the action attributes (ex. "userid=123", invoiceid=567, "action=APPROVE" or "REJECT", etc) are included like the POST parameters of a simple HTML form.
It works fine, but is that even close to what a RESTful web service is supposed to look like?
Any advice is greatly appreciated, thanks.
Rob
The URLs don't make an API RESTful or not. It is more important to clearly represent your resources and their state transitions (through links and forms) and avoiding out-of-band information that couples clients to your implementation. A RESTful Hypermedia API in Three Easy Steps covers this concept nicely.
1) Create a root resource that provides a well know starting point for all clients and allows them to discover the services available (this can be the same URL used by Browers. Use the Accept header to determine if HTML or your APIs media-type should be returned).
GET: http://localhost/webapp
<webapp href="/webapp">
<invoices href="/webapp/invoices"/>
... any other services ...
</webapp>
2) Create a collection resource for you invoices
GET: http://localhost/webapp/invoices
<invoices href="/webapp/invoices">
<invoice href="/webapp/invoices/555"/>
<invoice href="/webapp/invoices/554"/>
<invoice href="/webapp/invoices/553"/>
<invoice href="/webapp/invoices/552"/>
...
<search href="/webapp/invoices/" method="get">
<query type="xpath" cardinality="required"/>
</search>
<next href="/webapp/invoices?page=2" method="get"/>
<create-draft href="/webapp/invoices" method="post">
<total-price type="decimal" cardinality="optional"/>
... user should be picked up automatically based on the authorised user posting the form ...
... add other optional and required parameters here. ...
</create-draft>
</invoices>
This is a paginated collection, with the next element telling the client how to get the next page. If there weren't enough invoices (e.g., 5 invoices and each page can contain 10) then the next element would not be show. Similarly if the requester is no authorised to create invoices then the create-draft form would not be included.
Getting the next page would look something like:
GET: http://localhost/webapp/invoices?page=2
<invoices href="/webapp/invoices">
<invoice href="/webapp/invoices/545"/>
<invoice href="/webapp/invoices/544"/>
<invoice href="/webapp/invoices/543"/>
<invoice href="/webapp/invoices/542"/>
...
<search href="/webapp/invoices/" method="get">
<query type="xpath" cardinality="required"/>
</search>
<next href="/webapp/invoices?page=3" method="get"/>
<prev href="/webapp/invoices" method="get"/>
<create-draft href="/webapp/invoices" method="post">
<total-price type="xs:decimal" cardinality="optional"/>
... user should be picked up automatically based on the authorised user posting the form ...
... add other optional and required parameters here. ...
</create-draft>
</invoices>
3) Create an item resource for your invoices
GET: http://localhost/webapp/invoices/555
<invoice href="/webapp/invoice/555">
... details go here ...
<reject href="/webapp/invoices/555" method="delete">
<reason type="xs:string" cardinality="required"/>
</reject>
<approve href="/webapp/invoices/555" method="put">
... add approval parameters here ...
</approve>
</invoices>
Similarly, if the user is not authorised to reject or approve invoices then those elements should not be displayed. Same goes if the invoice has already been approved (in which case maybe there is a cancel form).
IMHO for the approval process I would do:
(4) Approve an invoice:
PUT: http://localhost/webapp/ws/invoices/555
As you are going to modify an existing resource, identified by the ID (555), so you only need to pass the attributes that will change.