Sunday, June 30, 2013

Activating Customer/Vendor field on Journal Transactions screen

Hi Guys,

What if our client wants to see Customer or Vendor ID on Journal Transactions screen grid?

There is an existing field, and it is populated from AR or AP modules with the ID.
But it is only available for view, we cannot edit it.
What if we need to track customer in our GL even if original transaction is from GL itself.

There are 2 ways to achieve it:

1. Add a field and make it selector from Business Accounts.

or

2. Activate the existing field so we can use for data entry.

Scenario 1. Adding a field.


It should be 30 characters long, as we will link it to the BAccount (Master table for Customer) BAccountCD field.



Last step is to choose a type of control, which is selector.



Then click Apply To Page. Lets publish the customization first to see added field to our grid.
Customization->Validate and Publish.

Now field is visible, but if I press magnifying glass message pops up:

It happens because we have not specified a Selector View in the field attributes. What I would like to do is to take existing selector from CRM module, Business Accounts screen.



Original Attributes from the Business Account field:


I will copy over PXDimensionSelector to my GL screen field.


I have to add reference to CRM module by using a prefix PX.Objects.CR in front of the DAC field:  PX.Objects.CR.BAccount.BAccountCD
There is one more hint here, we need to remove the second parameter from the selector call, finally will get this:


Apply to Page. Validate-Publish the customization. Result:






Scenario 2. Modifying Existing Customer/Vendor field.

Here we just need to change attributes for existing ReferenceID field and delete its Property.
Let's make attributes Visible and Enabled to be TRUE first.


Then we need to remove PXSegmentMaks property.


Apply to Page. Validate and Publish. Got the result:


All the best,
Sergey.

No comments:

Post a Comment