SuiteCommerce Advance: Unable to get the Free Shipping Rule Rate 'Insufficient permissions' for Custom Service - service

We tried loading shipping item data with 'nlapiLoadRecord', Currently we have two methods available Standard & Express. We tried to load data for standard method as below in Script Debugger.
​var standard = nlapiLoadRecord('shipitem',3);
We are getting all fields of standard shipitem in Script Debugger, then we are fetching shipping rule value with
var standard_amount = standard.getFieldValues('freeifordertotalisoveramount');
Then we tried to load these same data using nlapiLoadRecord in our custom SuiteScript Model, we tried to call this method in our custom ShippingDetails.Model, and tried to fetched the data on cart page but it is giving us 'Insufficient permissions' error massage. Please see below attached screenshot. nlapiLoadRecord('shipitem',3); does not allow us to load data on front end.

Basically this is not case with your code, as you are trying to load shipping rate using SuiteScript Service and model this is perfect.
​var standard = nlapiLoadRecord('shipitem',3);
var standard_amount = standard.getFieldValues('freeifordertotalisoveramount');
This is completely related with user's permission i.e Roles Under Setup-->User/Roles-->Manage Roles you are trying to fetch data of 'shippingitem' in this case you must need to check different permission
Check your Script Service is enabled, enabled for with out login in NS back end
Most Imp:
2. Check shipping item is added in permission under List i.e the role which you are using for Service, for that role you must need to set shipping item See below screen shot you will get more idea.

Related

Creating public action does not add to sequence

I am a new user following this tutorial provided by IBM.
I am up to this step:
For Cloudant Instance, select Input your own credentials and fill in the following fields with the credentials information captured for your cloudant service: Username, Password, Host and Database = guestbook and click Add and then Save.
After following the instruction to 'Add', I am returned to the sequence view (with the list of actions representing the sequence I'm working on).
Expected: The newly created public action w/ binding should appear in the list.
Instead: The newly created public action is not in the list. There is no evidence of it having been created at all. There is no option to 'save'.
Am I doing something wrong? This seems like an enormous bug.
Attempted solutions (unsuccessful):
Log out and back in.
Create new Cloudant service credentials.
Enter service credentials manually vs via dropdown.
Create action in a named package rather than default package.
Create new Cloudant service credentials, selecting a specific service ID.
PS
Attempted to create support ticket but needed to upgrade account by adding credit card. Filled in card information. Card rejected: "Error: Could not place order. Unable to verify the credit card. Declined due to Risk management". I use this card successfully all the time.
In actions UI, selected a sequence, added an action to the sequence, 'reset' sequence to discard changes, began to add yet another action, cancelled that new action, returned to sequence view and the previously created action that I had discarded was there. Ie seems like some backend / database propagation issues on IBM's end?
The steps have been updated in https://cloud.ibm.com/docs/tutorials?topic=solution-tutorials-serverless-api-webapp#sequence-of-actions-to-save-the-guestbook-entry.
To create the new Cloudant binding:
Set Name to binding-for-guestbook.
Set Instance to Input your own credentials.
Set Username, Password, Host and IAM API Key from the values found in the Cloudant credentials for-guestbook created earlier.
Set Database to guestbook.
Set whiskoverwriteLabel to true.
Save

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.

Google Calendar REST API does not return title and other event fields

Google calendar REST API GET method (https://developers.google.com/calendar/v3/reference/events/get) should return this structure (https://developers.google.com/calendar/v3/reference/events#resource), unless I'm missing something.
I need to get event title and description to use in my application. I 'm getting below response instead.
I've tried to change event visibility (public/private) and availability (free/busy). Actually, API does not show events with Free availability, for which I don't have solution either.
Here is event edit screen screenshot:
https://www.screencast.com/t/X8bRS8kJDT
{
"kind":"calendar#event",
"etag":"\"3145149995624000\"",
"id":"5fnlvcl2msab46p8roqbahhb6g",
"status":"confirmed",
"htmlLink":"https://www.google.com/calendar/event?eid=NWZubHZjbDJtc2FiNDZwOHJvcWJhaGhiNmcgZWQtYWRtaW4uY29tXzMwOHNycjdzdjdiM28xazRpdjZ2cm9mb3Y0QGc",
"updated":"2019-11-01T02:23:17.812Z",
"start":{
"dateTime":"2019-11-11T09:30:00+11:00"
},
"end":{
"dateTime":"2019-11-11T10:00:00+11:00"
},
"visibility":"private",
"iCalUID":"5fnlvcl2msab46p8roqbahhb6g#google.com"
}
Are there other methods to get calendar events details with REST API, including ones with free availability?
Thanks.
04/02/2020:
I actually made it work for "ordinary" Google account - add project, add API, add service account and allocate service account email to the calendar. But I still not sure how to change access level for G Suite account. It allows only to see Free/Busy status.
I've changed default access in Admin Console as this article suggests, but it does not help:
https://www.macworld.com/article/2980005/the-mystery-of-the-unsharable-google-apps-calendar.html
You could try specifying the fields you want to retrieve like the image below:
Or you could put a " * " as the image below to retrieve all values:
fields is a standard Query parameter, which specifies what values you want to include in your response. To learn more about it, you can check Here.

Using mashape api in sapui5

I'm fairly new to sapui5 and I'm trying to use the Hearthstone API in order to show a list of cards.
I've registered in the page and I've obtained the X-Mashape-Key which I'm using to try to connect to the API.
For this, I've created a destination with the following information:
Besides this, I've created a view and its corresponding controller with the onInit function, with the following code:
Being the sUrl: /hsApi/cards and oHeaders:
var oHeaders = {
"X-Mashape-Key": "key"
};
The result that I obtain is the following one:
Request is failing stating that I'm not authorized to request the information, even though that doing the same request in PostMan I'm obtaining the information.
Most likely, this is caused by something really obvious but I'm not able to see it.
Could you try adding the following property to your destination? I am not sure what this property does exactly, but maybe you need it to allow this destination to be used in your WebIDE. Also try changing your "True" and "TRUE" to lowercase "true".
But I think you don't need any "Additional property" at all. Can't hurt to try it without them aswell.
Please keep in mind that you need to restart your WebIDE everytime you change something in your destinations as those are loaded statically every time the WebIDE loaded.

Need help with Zend Framework dynamic Namespaces

I want to make my system redirect unknown requests such as
www.address.com/a_company
to the adress
www.address.com/companies/company/ and display the company a_company if it exists in the database, otherwise throw the user to a 404 not found page.
So in detail, I want to make namespace that is as the first example dynamically, if the company exist in the database, I have no problem connecting to the database and retrieving information or finding a way to parse a company name, I just need help how to make my system check and run a function every time the address doesn't exist and show the second page (/companies/company/)..
I am using an Acl as well, but I think it should be fine if the page is /companies/company and then possibly add /?c=a_company or similar.
Thank you.
/Marcus
simply create a front controller plugin which checks the request params agains the database before the request is dispatched.