Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Is it possible to have the same button run both a create service and an update service?

But like I said before, I do not know why that happens or how to fix it. Can you please help. It won't update the check boxes but it still change the ACL.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Is it possible to have the same button run both a create service and an update service?

Hi Ellen,

Show us your update before send mapping.

If you have some "JS" code on "acl" field - show code inside too.

Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Is it possible to have the same button run both a create service and an update service?

When a user clicks save, it saves the values in local storage like this. Image

Then here is the mapping Image The line on top is just listing the _ID.
I currently do not have any code in this ACL field but in the create, I have
var acl = {};
acl[value]= { "read": true, "write": true };
return acl;

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Is it possible to have the same button run both a create service and an update service?

Hi Ellen,

It seems you use "default" acl in this update service.

To drop this default value in update service please follow these steps:

  1. open update service "before send" mapping.

  2. Use following JS code to drop default value for this field:

    pre

    return undefined;

    /pre

    Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Is it possible to have the same button run both a create service and an update service?

I put that in the before send ACL field and that didn't change anything.

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Is it possible to have the same button run both a create service and an update service?

Hi Ellen,

Please show us your update item request (from debugger network tab) where we can see:

  1. All request parameters.

  2. All request headers.

  3. All response.

    Also show us your update service datasource "before send" mapping.

    Regards.

Ellen Schlechter
Posts: 0
Joined: Sun Aug 31, 2014 3:28 am

Is it possible to have the same button run both a create service and an update service?

Did these help you at all to figure out how to not change the ACL when I update an item?

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Is it possible to have the same button run both a create service and an update service?

Hi Ellen,

As i can see on your screen shots you have error 400 on put request.

See details: http://prntscr.com/5v1mt1/direct

Here is a reason why: http://prntscr.com/5v1n4s/direct

Regards.

Return to “Issues”