CoreBOSBB
Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Printable Version

+- CoreBOSBB (https://discussions.corebos.org)
+-- Forum: Development (https://discussions.corebos.org/forumdisplay.php?fid=18)
+--- Forum: coreBOS Development (https://discussions.corebos.org/forumdisplay.php?fid=4)
+--- Thread: Certain profiles can't use SalesOrder when MasterDetail Business Map is used (/showthread.php?tid=478)



Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Guido1982 - 11-01-2016

I've setup a Business Map that allows for "units delivered / received" in SalesOrders. Works fine for me, but for certain profiles, that have less rights, I get the following when trying to open a SalesOrder:

Code:
Fatal error: Uncaught exception 'WebServiceException' with message 'Permission to perform the operation is denied' in [[SERVER_PATH]]/crm/include/Webservices/DescribeObject.php:25 Stack trace: #0 [[SERVER_PATH]]/crm/modules/cbMap/processmap/MasterDetailLayout.php(206): vtws_describe('InventoryDetail...', Object(Users)) #1 [[SERVER_PATH]]/crm/modules/cbMap/processmap/MasterDetailLayout.php(164): MasterDetailLayout->getFieldInfo('units_delivered...') #2 [[SERVER_PATH]]/crm/modules/cbMap/processmap/MasterDetailLayout.php(98): MasterDetailLayout->convertMap2Array() #3 [[SERVER_PATH]]/crm/modules/cbMap/cbMap.php(472): MasterDetailLayout->processMap(Array) #4 [[SERVER_PATH]]/crm/include/utils/DetailViewUtils.php(1338): cbMap->__call('MasterDetailLay...', Array) #5 [[SERVER_PATH]]/crm/include/ut in [[SERVER_PATH]]/crm/include/Webservices/DescribeObject.php on line 25

I've set the permissions for this profile to allow the use of InventoryDetails module, but without success...


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - kapsule - 11-02-2016

(11-01-2016, 07:35 PM)Guido1982 Wrote: I've setup a Business Map that allows for "units delivered / received" in SalesOrders. Works fine for me, but for certain profiles, that have less rights, I get the following when trying to open a SalesOrder:


Code:
Fatal error: Uncaught exception 'WebServiceException' with message 'Permission to perform the operation is denied' in [[SERVER_PATH]]/crm/include/Webservices/DescribeObject.php:25 Stack trace: #0 [[SERVER_PATH]]/crm/modules/cbMap/processmap/MasterDetailLayout.php(206): vtws_describe('InventoryDetail...', Object(Users)) #1 [[SERVER_PATH]]/crm/modules/cbMap/processmap/MasterDetailLayout.php(164): MasterDetailLayout->getFieldInfo('units_delivered...') #2 [[SERVER_PATH]]/crm/modules/cbMap/processmap/MasterDetailLayout.php(98): MasterDetailLayout->convertMap2Array() #3 [[SERVER_PATH]]/crm/modules/cbMap/cbMap.php(472): MasterDetailLayout->processMap(Array) #4 [[SERVER_PATH]]/crm/include/utils/DetailViewUtils.php(1338): cbMap->__call('MasterDetailLay...', Array) #5 [[SERVER_PATH]]/crm/include/ut in [[SERVER_PATH]]/crm/include/Webservices/DescribeObject.php on line 25

I've set the permissions for this profile to allow the use of InventoryDetails module, but without success...

Hi Guido,

That error is because you can not access a field. Which method are made to the web service?


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Guido1982 - 11-02-2016

(11-02-2016, 08:29 AM)kapsule Wrote: Hi Guido,

That error is because you can not access a field. Which method are made to the web service?

None, I've only implemented a Business Map. I suspect this Business Map uses the webservice methods in the background, which leads to a webservice error.


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - kapsule - 11-02-2016

OK. Then shows this error when going to register a CMap?


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Guido1982 - 11-02-2016

No. The Business Map is used to display the units delivered / received field from inventorydetails in the edit or detailview of a salesorder. The error occurs when a detailview / editview for any salesorder is opened. Error reporting was set to ALL for this, otherwise there would just be a white screen below the menubar. Also, this works for me (admin), but not for a profile that's not admin. Have not tested all profiles yet, just mine and the other one.


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - kapsule - 11-03-2016

I understand. If, then is something that has to do with access to the web serivces for a normal user. Can I give an example of the map that you are applying? I say this to try to play it in my coreBOS installation.


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Guido1982 - 11-03-2016

Hmm, maybe I need to check permission for normal profiles to webservice. Don't even know if this is possible. This is the map:

PHP Code:
<map>
  <
originmodule>SalesOrder</originmodule>
  <
targetmodule>InventoryDetails</targetmodule>
  <
linkfields>
  <
originfield>lineitem_id</originfield>
  <
targetfield>lineitem_id</targetfield>
  </
linkfields>
  <
sortfield>sequence_no</sortfield>
  <
detailview>
    <
fields>
      <
field>
        <
fieldtype>corebos</fieldtype>
        <
fieldname>units_delivered_received</fieldname>
        <
editable>1</editable>
        <
mandatory>1</mandatory>
        <
hidden>0</hidden>
      </
field>
   </
fields>
  </
detailview>
</
map

The name is "SalesOrderInventoryDetails".


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Guido1982 - 11-04-2016

I think I solved this. I turned on "WSAPP" for this profile. Didn't know the webservice was a module in the module list...


RE: Certain profiles can't use SalesOrder when MasterDetail Business Map is used - Guido1982 - 11-04-2016

Still some weird behaviour for this Business Map on another profile, different behaviour. I'll test outside business hours.