Renaming and locking a field  Topic is solved

Discussions relating to plugin development, and the Jiwa API.

Renaming and locking a field

Postby Atronics » Wed May 11, 2016 11:17 am

How do I
1. rename a field? e.g. IN_Main.SecondaryCost
2. lock a field to eliminate inadvertent changes
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10

Re: Renaming and locking a field

Postby Mike.Sheen » Thu May 12, 2016 10:19 pm

Atronics wrote:How do I
1. rename a field? e.g. IN_Main.SecondaryCost
2. lock a field to eliminate inadvertent changes


You reference to IN_Main.SecondaryCost suggests you want to rename the table column - we don't support that. You can, however rename the label presented to the user on the Inventory Maintenance form. A plugin can do that - add the Inventory Maintenance form to a plugin's forms list, and in the Setup method set the Text property of the desired control. You can find the control name using the permissions function (via the ribbon) when the Inventory Maintenance form is loaded - it will list all the control names for you.

Regarding locking a field to prevent editing - using the permissions system to do that is the easiest - no coding required, just load the Inventory Maintenance form and select the permissions tool on the ribbon and select Disallow for the write permission to the desired user groups. Remember that when setting disallow permissions, it applies no matter what other user groups a user is a member of - so you only need to have users be the member of one group with that permission set to disallow.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Renaming and locking a field

Postby Atronics » Fri May 13, 2016 4:49 pm

Mike, I am at the edge of my capabilities with this. COuld you give me an example of the code that I need to insert "in the Setup method" and where.
Much appreciated.
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10

Re: Renaming and locking a field

Postby Mike.Sheen » Sun May 15, 2016 8:50 pm

Atronics wrote:Mike, I am at the edge of my capabilities with this. COuld you give me an example of the code that I need to insert "in the Setup method" and where.
Much appreciated.


Then you shouldn't be attempting this.

We've given you plenty of plugins in the past which should have served you well as a starting point for a plugin like which you're asking for. If you're not able to do it yourself, then perhaps you should recruit a developer who can. It's quite apparent to me now that you're not a developer and have no interest in being one.

Our largesse in these forums by providing plugins is intended to help developers gain skills and knowledge to be effective in developing plugins for Jiwa. You don't seen to be doing anything other than asking us to write plugins for free. We don't do that here. We'll help if you've have a crack at it, and provide guidance - but only if you're a developer and have actually demonstrated you've tried to solve the problem on your own first. I think we've been pretty generous with you so far, but it's time to reign back what we do for free.

We CAN do it for you, but you need to pay for it. You can contact [email protected] and ask for a quote. Note: You need to be clear on what you want - we charge by the hour, and if what you asked for on your quote isn't what you wanted, then we will bill you for amendments.

Mike
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756

Re: Renaming and locking a field

Postby Atronics » Mon May 16, 2016 11:19 am

Mike,
I am simply trying to provide a solution to a client requirement. If I don't know how to do this, then I ask someone who can provide the necessary assistance. You are correct. I am not a software developer, you are; and I am seeking your assistance, which has been very gratefully accepted in the past.
John
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10

Re: Renaming and locking a field  Topic is solved

Postby Mike.Sheen » Tue May 17, 2016 9:30 pm

I've created a bug for a generic solution to allow users to rename labels themselves on all forms - DEV-4949.

In the meantime, the attached plugin does specifically what you asked for - renames the label for the SecondaryCost field on inventory maintenance. You'll need to edit the code to set the text to be exactly what you want (look for "XXX" and change that to what you want).

The code which renames the field is shown below:
Code: Select all
public void Setup(JiwaFinancials.Jiwa.JiwaApplication.IJiwaForm JiwaForm, JiwaFinancials.Jiwa.JiwaApplication.Plugin.Plugin Plugin)
{
    var inventoryForm = (JiwaFinancials.Jiwa.JiwaInventoryUI.InventoryMaintenanceForm)JiwaForm;
    inventoryForm.SecondaryCostLabel.Text = "XXX";
}


Mike
Attachments
Plugin Inventory Maintenance - Rename Secondary Cost.xml
Rename secondary cost field
(29.04 KiB) Downloaded 160 times
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2444
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 756


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 19 guests