Unlock custom line field on Closed sales  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

Unlock custom line field on Closed sales

Postby DannyC » Mon Apr 14, 2025 3:43 pm

I've got a text box on a sales order line custom field.
When the sales order is closed, I want this column to still be allowed edits.

Can't work out how to do it.
I've tried in the LineCustomFieldPlugin section, FormatCell.
Code: Select all
GridObject.LockColumn(false,"My ColName", Row);


Also have tried similar code in the LineDisplayed event of the form, and the sales order ReadEnd event.

None have worked. What's the trick?

v. 7.2.1. SR22.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Unlock custom line field on Closed sales  Topic is solved

Postby Mike.Sheen » Mon Apr 14, 2025 4:11 pm

LineDisplayed of the form will definitely do what you want - if you've tried that already and it's not working then your "My ColName" is probably wrong - hard to say for sure without a sample, but usually that's what trips most people up.

Use the manage grid function to see the key of the column - you'll see it's actually {Plugin Name}.{Custom field name} - to you might need to change "My ColName" to "My Plugin Name.My ColName".
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Unlock custom line field on Closed sales

Postby DannyC » Mon Apr 14, 2025 5:20 pm

your "My ColName" is probably wrong


Yep.
This is better
Code: Select all
String.Format("{0}.{1}", _plugin.Name, "My ColName")


Needed on LineDisplayed and the SalesOrderLineChanged events.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Unlock custom line field on Closed sales

Postby Mike.Sheen » Mon Apr 14, 2025 5:26 pm

DannyC wrote:Yep.
This is better
Code: Select all
String.Format("{0}.{1}", _plugin.Name, "My ColName")



Are you saying that resolved your issue? Or were you just pointing out that your example was over-simplified and you already were using {Plugin Name}.{Column Name} ?

DannyC wrote:Needed on LineDisplayed and the SalesOrderLineChanged events.

No need to do both - just LineDisplayed will suffice.
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: 2583
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 807

Re: Unlock custom line field on Closed sales

Postby DannyC » Tue Apr 15, 2025 11:53 am

Are you saying that resolved your issue?

Yes. By having both the plugin name and the custom field name, that was what I was missing and resolved the issue.
User avatar
DannyC
Senpai
Senpai
 
Posts: 718
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 0 guests