on Invent journal create form when name of move journal is changed description changes accordingly to name. here
here i have customized this site fields , now it should also be changed according to movement journal name as description is changing above.
Have you debugged the code? Put breakpoint on 'add' method in 'Info' class and check call stack to find from where error is thrown. Also, please share the code you have written on initValue method in table extension class.
used this code but still referrnce object error is coming !!
You have added same code as that of modified field. No need to mention the field num in the initvalue method.
Only modified field will have field id which is used to identify which field is modified in the form.
public void initValue() { next initvalue(); if (this.JournalNameId) { InventJournalName journalName = InventJournalName::find(this.JournalNameId); this.InventSiteId = journalName.OABSiteId; } }
Thanks,
Girish S.
void initValue()
{
case fieldNum(InventJournalTable, JournalNameId):
if (this.JournalNameId)
{
InventJournalName journalName = InventJournalName::find(this.JournalNameId);
this.InventSiteId = journalName.OABSiteId;
}
next initvalue();
}
this comes written this code
I think you need to create Name right then only the description and site will be autopopulated right?
How the name field will be defaulted while opening the form?
If you still need it, you need to add the code at table level initValue method.
Add the same logic you had written in the modifiedField at table level.
Thanks,
Girish S.
Write same code in initValue method of table. When creating new record if Name field value is defaulted then initValue method will work.
when i am opening then form site is coming blank it should also be filled as per journal name , how this can be done ?
yes its workking
Great, just remove one semi column from here below code.
journalName.OABSiteId;;
Code seems to be okay. Have you checked that? is that working?
Thanks,
Girish S.
André Arnaud de Cal...
291,965
Super User 2025 Season 1
Martin Dráb
230,817
Most Valuable Professional
nmaenpaa
101,156