Attask- how to know that whether particular custom form is selected in the task or not - categories

I want to search only those task from the project, which has a particular custom form (though not selected any field).
attask/api/task/5775...?fields=parameterValues,category
This returns only first custom form(category) object selected in the task and not all the custom forms..
I want to find all those task which contains particular categoryID..
Attask/api/ task/search?categoryID= 46785335&fields=parameterValues
It doesn't return me response when custom form selected after another custom form..

Since multiple custom forms is a new feature it is still only in earlyAccess this has not been released to the current API. You can however do this using the unsupported API.
the following will do what you are wanting.
GET attask/api-unsupported/task/search?objectCategoriesMM:ID=55a4232e005dc2668af39a4f24a4db40
This will search all forms not just the primary(first) form

Related

How to populate fields of an online form

I created a custom record (child of Inventory item) and an online form.
The final goal it's to send a link to a user (not a netsuite user) to display the different informations of this custom record. The user will be able to update some values and submit the form.
I saw it's possible to link a script file to this form, but I need the ID of the record to load it and populate every field of the form.
With normal forms, we have the internalid of the record as an URL param but in this case there is nothing in the URL .
Do you know any way to achieve that ?
A solution for the final goal could be:
Create an empty Suitelet (provides external link for User). Or refer to step 4 for contents.
Stored on the Custom record or via script (created in step 3) you can add to the external link, to include the record type and id as url parameters (&recordtype=customrecord&recid=12345). Be sure to avoid reserved parameter names.
Create a UserEvent, Client, or Scheduled Script to send email to User based on your requirements (in the email include the custom external suitelet link). User will click on the link and land on a NetSuite looking webpage (not requiring credentials).
Modify empty Suitelet. Suitelet should when context.request.method===GET: get parameters, load record(s), get data from record(s), create form, display data to User, display fields for User to enter data, add submit and refresh/cancel button, write/display the form with all fields. Upon submission (when context.request.method is not GET) you can use record.submit method to update the custom record(s).
NetSuite Suite Answer Id 74607 has a Sample Custom Form Suitelet Script from that can be very helpful.

What is the best way to create a form with a confirmation page?

I would like to create the following form:
Step 1: The user enters his contact details.
Step 2: A confirmation page, where the user has the possibility to confirm or edit his entered data again (back to step 1)
The contact details are stored in an entity domain object. The properties have annotations for validation.
My problem:
When I pass the contact object to the confirmation page, I get the message
Could not serialize Domain Object Vendor\Extension\Domain\Model\Object. It is neither an Entity with identity properties set, nor a Value Object.
I understand that I cannot pass a non-persistent domain object. A tip I found was to convert the object to an array and back again later. This works to display the input on the confirmation page. But if the user edits the data, I lose the validation functionality when converting to an array.
Another possibility would be to persist the object already after step 1 (temporarily?) . The problem here is that the data must not be displayed in the backend (they are not yet confirmed). In addition, unused data is created if the user cancels the process.
Is it possible to save objects temporarily?
What is the most elegant solution to this problem?
If you only wan't to create a form, why don't you use a form plugin like Ext:form or Ext:powermail? These have a summary page by default. And you have the possibility to write the entered data into you're database.

square listCustomers call does not include custom fields in Response customer object

I'm trying to come up to speed on the Square API. I have been able to successfully create a post call to CreateCustomer() and a get call to ListCustomers(). In both cases, the customer objects come through fine but the custom fields I have added to extend the customer object are not present. When I add, view and edit Customers using the Square Dashboard they show up as expected. They are also present if I export Customers from the Dashboard.
Is there a way to get the custom fields to be included in Square's Rest API calls?
At this time Square's APIs will not return custom fields.

Is there a way to remove field value using model in CakePHP?

I'm developing an application in CakePHP 2.7 and I have a form where that sends off an Ajax request from a file input and returns some information. This information is then stored inside a hidden form field.
I have a custom validation rule that checks against the hidden field and another to see if both have been submitted as the system can only handle one. When the validation rule returns false it flags up an invalidate message to notify the user of the issue. However now I am left with an issue where the hidden field still contains a value and so does the other field the user filled out but I can't remove the value from the hidden field.
Is there any way I can remove the value from the hidden field inside the model?
I have looked at this question on StackOverflow but it wasn't successsful in helping and dates back to an earlier version of CakePHP based on the date of the question.

Implement Inbox Functionality in custom cq component?

We want to develop a smooth-flowing workflow experience (but still use workflows). Currently, a user needs to use the sidekick to initiate the workflow, then to the inbox, which takes them back to the page to use the sidekick again. When they go to the inbox, they need to restrict to the model and path of the page. It would be nice for the user to only have to go to the content page and from there, launch the different workflow forms that need to happen, like a little "inbox" right on the page that is subject to the workflow.
I have written a custom component that can initiate the custom workflow. The custom component can also query the WorkFlowSession and obtain any active WorkItems for the current page that the component resides (using the WorkItemFilter interface). What I want to do is provide a link to the user to the next step in the workflow from the custom component, just like the inbox does.
Here is an example output from an WorkItem instance toString method:
21.05.2014 09:45:29.300 *ERROR* [0:0:0:0:0:0:0:1%0 [1400679929160] GET /content/test/mailing1.html HTTP/1.1] org.rand.whatcounts.EmailCampaignCoordinator Found workitem: -----------------------------
WorkItem Id: /etc/workflow/instances/2014-05-21/model_1400679794564399000/workItems/node4_etc_workflow_instances_2014-05-21_model_1400679794564399000
Workflow Id: /etc/workflow/instances/2014-05-21/model_1400679794564399000
Payload: /content/test/mailing1
Payload Type: JCR_PATH
key = historyEntryPath value = /etc/workflow/instances/2014-05-21/model_1400679794564399000/history/1400679924113
key = comment value =
My hope is that by using the workflow api items, I can create the link that the user could click on to proceed in the workflow (just like the inbox).
Thanks for listening!
Phillip
There are two ways to implement this
Java-Based Solution
I was able to figure out one way by looking at
http://localhost:4502/libs/cq/workflow/components/inbox/list/json.jsp
The important part of this jsp is that, given a workItem instance, you can get the path for your next step using the JcrPathBuilderManager:
pathBuilder.getPath(wi);
Using this, I was able to output a link to the next step in the workflow to the user (without having user go to their inbox).
Javascript/JSON Based Solution
I didn't go far with this solution (I didn't write any js) but this was my fall back position if I didn't find the java-solution listed above. Once could implement custom JS in CQ Component that would call the json feed for the user inbox, do some client side filtering (to restrict it to only items related to current page). The URL to the feed is
http://localhost:4502/libs/cq/workflow/content/inbox/list.json?start=0&limit=40
Thanks!