Hi ,
In Accounting module I need to navigate a screen from "Edit Financial Account Transaction" to "Edit Accounting Transaction" For this I mentioned request-map success view as EditAcctgTrans instead of EditFinAccountTrans in the controller . But its navigating a screen with only appbar menu and AccountingAppBar menu. Please help me in this issue... navigationScreen.png Regards, Prasanthi |
hi Prasanthi,
the EditAcctgTrans screen has a condition <not><if-empty field="acctgTransId"/></not> which is not getting fulfilled, and there's nothing in the <fail-widget/> hence a blank screen is displayed -- Thanks & Regards Atul Vani Jr. Software Developer HotWax Media Pvt. Ltd. http://www.hotwaxmedia.com/ prasanthi_ofbiz wrote: > Hi , > In Accounting module I need to navigate a screen from "Edit Financial > Account Transaction" to "Edit Accounting Transaction" > For this I mentioned request-map success view as EditAcctgTrans instead of > EditFinAccountTrans in the controller . But its navigating a screen with > only appbar menu and AccountingAppBar menu. > Please help me in this issue... > http://n4.nabble.com/file/n2221044/navigationScreen.png navigationScreen.png > > Regards, > Prasanthi > |
Hi vani,
Its true.Thatsy i have created a new section with out that condition and with out <decorator-screen> and <decorator-section> then its navigating If you add the <decorator-screen> and <decorator-section> then again same problem.. withoutDecorationScreens.png Regards, Prasanthi |
Hello Prasanthi,
check whether you are getting the value of acctgTransId or not in your targeted screen. On Tue, May 18, 2010 at 4:50 PM, prasanthi_ofbiz < [hidden email]> wrote: > > Hi vani, > Its true.Thatsy i have created a new section with out that condition and > with out <decorator-screen> and <decorator-section> then its navigating > If you add the <decorator-screen> and <decorator-section> then again same > problem.. > > http://n4.nabble.com/file/n2221121/withoutDecorationScreens.png > withoutDecorationScreens.png > > Regards, > Prasanthi > > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Not-able-to-navigate-to-a-screen-tp2221044p2221121.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > -- Arpit Singh Pandya Enterprise Software Developer Direct : +91-982-693-2255 |
In reply to this post by prasanthi_ofbiz
the decorator screen calls another decorator ('CommonPartyDecorator')
which got its own conditions which needs be fulfilled, i didn't got much time to look into the problem but this should solve it... -- Thanks & Regards Atul Vani Jr. Software Developer HotWax Media Pvt. Ltd. http://www.hotwaxmedia.com/ prasanthi_ofbiz wrote: > Hi vani, > Its true.Thatsy i have created a new section with out that condition and > with out <decorator-screen> and <decorator-section> then its navigating > If you add the <decorator-screen> and <decorator-section> then again same > problem.. > > http://n4.nabble.com/file/n2221121/withoutDecorationScreens.png > withoutDecorationScreens.png > > Regards, > Prasanthi > > |
In reply to this post by Arpit Singh Pandya-2
Hi Arpit,
Yeah that parameter was not getting passed from financial account screen. Actually I called createAcctgTrans service from createFinAccountTrans. So logic for passing acctgTransId is same right? I don't know its not carried forward . How to pass this acctgTransId variable?? Regards Prasanthi |
In reply to this post by Arpit Singh Pandya-2
Hi Arpit
Please tell me how to pass acctgTransId and organizationPartyId should be passed and from which service i.e: from createFinAccountTrans or createAcctgTrans Regards Prasanthi |
In reply to this post by Atul Vani
Hi vani
Yeah CommonPartyDecorator expecting organizationPartyId which is not avaialble in the screen . Now Its working fine. Thanks. But the acctgTransId is not getting passed from the previous screen so Edit Transaction and Edit Transaction Entries were not included. Please let me know how to pass it. Regards, Prasanthi |
In reply to this post by prasanthi_ofbiz
Hello Prasanthi,
<call-service service-name="createAcctgTrans" in-map-name="InputMap"> <result-to-field result-name="acctgTransId"/> </call-service> It will return acctgTransId then return this "acctgTransId" from createFinAccountTrans service as <field-to-result field="acctgTransId" result-name="acctgTransId"/> try this, HTH -- Arpit Singh Pandya Enterprise Software Developer | Hotwax Media Pvt. Ltd. @Indore Direct : +91-982-693-2255 On Tue, May 18, 2010 at 6:20 PM, prasanthi_ofbiz < [hidden email]> wrote: > > Hi Arpit > Please tell me how to pass acctgTransId and organizationPartyId should be > passed and from which service i.e: from createFinAccountTrans or > createAcctgTrans > > Regards > Prasanthi > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Not-able-to-navigate-to-a-screen-tp2221044p2221222.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Hi Arpit,
thanks for tour reply. Please check my code <simple-method method-name="<b>createFinAccountTrans" short-description="Create a Financial Account Transaction"> <call-simple-method method-name="getArithmeticSettingsInline"/> <make-value value-field="newEntity" entity-name="FinAccountTrans"/> <set-nonpk-fields value-field="newEntity" map="parameters"/> <sequenced-id sequence-name="FinAccountTrans" field="newEntity.finAccountTransId"/> <field-to-result field="newEntity.finAccountTransId" result-name="finAccountTransId"/> <now-timestamp field="nowTimestamp"/> <if-empty field="newEntity.transactionDate"> <set from-field="nowTimestamp" field="newEntity.transactionDate"/> </if-empty> <if-empty field="newEntity.entryDate"> <set from-field="nowTimestamp" field="newEntity.entryDate"/> </if-empty> <set field="newEntity.performedByPartyId" from-field="userLogin.partyId"/> <set field="originalAmount" from-field="newEntity.amount"/> <calculate field="newEntity.amount" decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}"> <calcop operator="get" field="newEntity.amount"/> </calculate> <if-compare-field field="newEntity.amount" to-field="originalAmount" operator="not-equals" type="BigDecimal"> <log level="warning" message="In createFinAccountTrans had to round the amount from [${originalAmount}] to [${newEntity.amount}]"></log> </if-compare-field> <create-value value-field="newEntity"/> <field-to-result field="newEntity.finAccountTransId" result-name="finAccountTransId"/> <set from-field="newEntity.transactionDate" field="createAcctgTransParams.transactionDate" /> <set field="createAcctgTransParams.partyId" from-field="newEntity.partyId"/> <set value="N" field="createAcctgTransParams.isPosted"/> <set value="ACTUAL" field="createAcctgTransParams.glFiscalTypeId"/> <set from-field="newEntity.amount" field="createAcctgTransParams.OrigAmount"/> <if-not-empty field="newEntity.finAccountTransTypeId"> <if-compare field="newEntity.finAccountTransTypeId" operator="equals" value="DEPOSIT"> <set value="RECEIPT" field="createAcctgTransParams.acctgTransTypeId"/> </if-compare> <if-compare field="newEntity.finAccountTransTypeId" operator="equals" value="WITHDRAWAL"> <set value="PAYMENT_ACCTG_TRANS" field="createAcctgTransParams.acctgTransTypeId"/> </if-compare> </if-not-empty> <call-service service-name="createAcctgTrans" in-map-name="createAcctgTransParams" include-user-login="true"> <result-to-field result-name="acctgTransId"/> </call-service> <field-to-result field="acctgTransId" result-name="acctgTransId"/> </simple-method> Giving Error like The Following Errors Occurred: Unknown parameter found: [createFinAccountTrans.acctgTransId] At the same time code for accessing it from screen is written below <set field="acctgTransId" from-field="parameters.acctgTransId"/> I don't want to change the above line because if I am accessing the same Accounting transaction Posting screen from normal flow so it should not interrupt . Please suggest me the best way to resolve it Regards, Prasanthi |
Prasanthi, Can you please post your service definition of "createFinAccountTrans ". It seems that you missed some out parameter. Regards -- Deepak Dixit prasanthi_ofbiz wrote: > Hi Arpit, > thanks for tour reply. Please check my code > <simple-method method-name="createFinAccountTrans" short-description="Create > a Financial Account Transaction"> > <call-simple-method method-name="getArithmeticSettingsInline"/> > <make-value value-field="newEntity" entity-name="FinAccountTrans"/> > <set-nonpk-fields value-field="newEntity" map="parameters"/> > <sequenced-id sequence-name="FinAccountTrans" > field="newEntity.finAccountTransId"/> > <field-to-result field="newEntity.finAccountTransId" > result-name="finAccountTransId"/> > <now-timestamp field="nowTimestamp"/> > <if-empty field="newEntity.transactionDate"> > <set from-field="nowTimestamp" > field="newEntity.transactionDate"/> > </if-empty> > <if-empty field="newEntity.entryDate"> > <set from-field="nowTimestamp" field="newEntity.entryDate"/> > </if-empty> > <set field="newEntity.performedByPartyId" > from-field="userLogin.partyId"/> > <!-- make sure the amount is a sane number --> > <set field="originalAmount" from-field="newEntity.amount"/> > <calculate field="newEntity.amount" > decimal-scale="${roundingDecimals}" rounding-mode="${roundingMode}"> > <calcop operator="get" field="newEntity.amount"/> > </calculate> > <if-compare-field field="newEntity.amount" to-field="originalAmount" > operator="not-equals" type="BigDecimal"> > <log level="warning" message="In createFinAccountTrans had to > round the amount from [${originalAmount}] to [${newEntity.amount}]"></log> > </if-compare-field> > <create-value value-field="newEntity"/> > <field-to-result field="newEntity.finAccountTransId" > result-name="finAccountTransId"/> > <!-- MYCODE START--> > <set from-field="newEntity.transactionDate" > field="createAcctgTransParams.transactionDate" /> > <set field="createAcctgTransParams.partyId" > from-field="newEntity.partyId"/> > <set value="N" field="createAcctgTransParams.isPosted"/> > <set value="ACTUAL" > field="createAcctgTransParams.glFiscalTypeId"/> > <set from-field="newEntity.amount" > field="createAcctgTransParams.OrigAmount"/> > <if-not-empty field="newEntity.finAccountTransTypeId"> > <if-compare field="newEntity.finAccountTransTypeId" > operator="equals" value="DEPOSIT"> > <set value="RECEIPT" > field="createAcctgTransParams.acctgTransTypeId"/> > </if-compare> > <if-compare field="newEntity.finAccountTransTypeId" > operator="equals" value="WITHDRAWAL"> > <set value="PAYMENT_ACCTG_TRANS" > field="createAcctgTransParams.acctgTransTypeId"/> > </if-compare> > </if-not-empty> > <call-service service-name="createAcctgTrans" > in-map-name="createAcctgTransParams" include-user-login="true"> > <result-to-field result-name="acctgTransId"/> > </call-service> > <field-to-result field="acctgTransId" result-name="acctgTransId"/> > <!-- END --> > </simple-method> > > > Giving Error like > > The Following Errors Occurred: > Unknown parameter found: [createFinAccountTrans.acctgTransId] > > At the same time code for accessing it from screen is written below > <set field="acctgTransId" from-field="parameters.acctgTransId"/> > I don't want to change the above line because if I am accessing the same > Accounting transaction Posting screen from normal flow so it should not > interrupt . > Please suggest me the best way to resolve it > > Regards, > Prasanthi > > |
Hi Deepak Dixit,
I posted my service in the previous reply only. I think this error was coming because of acctgTransId is not a column in FinAccountTrans table. Thatsy its giving Unknown parameter found: [createFinAccountTrans.acctgTransId]. but in the EditAcctgTrans screen expecting the acctgTransId which will not be availed in my case . Please help me how to pass it. Regards, Prasanthi |
Hello Prasanthi,
I am asking about its service definition? You had changed its implementation but have you made changes in its definition. Service definition available in services.xml in servicedef directory of respective component. You want that service return "acctgTransId" so you need to set <attribute name="acctgTransId" type="String" mode="OUT"/> in service definition and then restart the server. This can help : https://cwiki.apache.org/confluence/display/OFBTECH/Service+Engine+Guide#ServiceEngineGuide-serviceDefinition Thanks & Regards -- Deepak Dixit HotWax Media Pvt. Ltd. Website :- www.hotwaxmedia.com Contact :- +91-98267-54548 prasanthi_ofbiz wrote: > Hi Deepak Dixit, > I posted my service in the previous reply only. I think this error was > coming because of acctgTransId is not a column in FinAccountTrans table. > Thatsy its giving Unknown parameter found: > [createFinAccountTrans.acctgTransId]. but in the EditAcctgTrans screen > expecting the acctgTransId which will not be availed in my case . Please > help me how to pass it. > Regards, > Prasanthi > |
Hi Deepak Dixit ,
Thanks your suggestion. I missed out that out field specification . Now its working fine. I want to know one more . How to load the parent record details in the service by passing fk column. My requirement is inside createFinAccountTrans service I want to get the postToGlAccountId of respective 'finAccountId'. Presently I have finAccountId in my hand and by using it I want to retrieve postToGlAccountId,which is in its parent table "Fin_Account". Regards, Prasanthi |
In reply to this post by Deepak Dixit-2
Hi Deepak
I have written below code inside service implementation for loading the parent entity then iterated with list until my condition was satisfied. Is it a correct approach of any other suggestions? <entity-condition entity-name="FinAccount" list="finAccountList"> <condition-expr field-name="finAccountId" from-field="newEntity.finAccountId" /> </entity-condition> <iterate entry="finAccount" list="finAccountList"> <if> <condition><if-compare field="finAccount.finAccountId" operator="equals" from-field="newEntity.finAccountId"/></condition> <then><set field="createAcctgTransEntryParams.glAccountId" from-field="finAccount.postToGlAccountId"/></then> </if> </iterate> But the value of createAcctgTransEntryParams.glAccountId is null. Please suggest me what's the mistake Regards, Prasanthi |
Hi Prasanthi,
Why you use entity-condition instead of entity-one. Use entity one for retrieve record basis of primary key. comment inline : prasanthi_ofbiz wrote: > Hi Deepak > I have written below code inside service implementation for loading the > parent entity then iterated with list until my condition was satisfied. Is > it a correct approach of any other suggestions? > > > <entity-condition entity-name="FinAccount" list="finAccountList"> > <condition-expr field-name="finAccountId" > from-field="newEntity.finAccountId" /> > </entity-condition> > <iterate entry="finAccount" list="finAccountList"> > <if> > <condition><if-compare field="finAccount.finAccountId" > operator="equals" from-field="newEntity.finAccountId"/></condition> > above condition does not make sense. > <then><set field="createAcctgTransEntryParams.glAccountId" > from-field="finAccount.postToGlAccountId"/></then> > </if> > </iterate> > > But the value of createAcctgTransEntryParams.glAccountId is null. Please > suggest me what's the mistake > Regards, > Prasanthi > Regards -- Deepak Dixit HotWax Media Pvt. Ltd. Website :- www.hotwaxmedia.com Contact :- +91-98267-54548 Skype Id :- deepakdixit |
Hi Deepak,
Even though I have written below code also giving same problem <set field="tempFinAccountId" from-field="newEntity.finAccountId"/> <entity-one entity-name="FinAccount" value-field="finAccount"> <field-map field-name="finAccountId" from-field="newEntity.finAccountId"/> </entity-one> <if> <condition> <if-compare field="finAccount.finAccountId" operator="equals" value="tempFinAccountId"/> </condition> <then> <set field="createAcctgTransEntryParams.glAccountId" from-field="finAccount.postToGlAccountId"/> </then> </if> Reagards, Prasanthi |
Hi Prasanthi,
you should use <if-not-empty field="finAccount"/> instead of<if-compare field="finAccount.finAccountId" .../> and make sure if "postToGlAccountId" holds any value or not. for the debuggin purpose you can use <log level="info" message="${foo}"/> I am not sure but for your previous code ?snippets it seems that you are not set the value for "postToGlAccountId" and try to retrieve it . Regards -- Deepak Dixit HotWax Media Pvt. Ltd. Website :- www.hotwaxmedia.com Contact :- +91-98267-54548 Skype Id :- deepakdixit prasanthi_ofbiz wrote: > Hi Deepak, > Even though I have written below code also giving same problem > > <set field="tempFinAccountId" from-field="newEntity.finAccountId"/> > <entity-one entity-name="FinAccount" value-field="finAccount"> > <field-map field-name="finAccountId" > from-field="newEntity.finAccountId"/> > </entity-one> > <if> > <condition> > <if-compare field="finAccount.finAccountId" operator="equals" > value="tempFinAccountId"/> > </condition> > <then> > <set field="createAcctgTransEntryParams.glAccountId" > from-field="finAccount.postToGlAccountId"/> > </then> > </if> > > Reagards, > Prasanthi > |
Hi Deepak,
Thanks for u r reply. I have written the below code now its working fine. <entity-condition entity-name="FinAccount" list="finAccountList"> <condition-expr field-name="finAccountId" from-field="newEntity.finAccountId"/> </entity-condition> <iterate entry="finAccount" list="finAccountList"> <set field="createAcctgTransEntryParams.glAccountId" from-field="finAccount.postToGlAccountId"/> <set field="createAcctgTransEntryParams.currencyUomId" from-field="finAccount.currencyUomId"/> <set field="createAcctgTransEntryParams.origCurrencyUomId" from-field="finAccount.currencyUomId"/> </iterate> Regards, Prasanthi |
Hello Prasanthi,
Good to hear that you have done with your issue, but I suggest you to create practice application first. That will help you in learning basic concept. http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginners+Development+Guide+Using+Practice+Application+(Hello+World...)<http://docs.ofbiz.org/display/OFBIZ/OFBiz+Beginners+Development+Guide+Using+Practice+Application+%28Hello+World...%29> -- Arpit Singh Pandya Enterprise Software Developer Direct : +91-982-693-2255 On Wed, May 19, 2010 at 6:31 PM, prasanthi_ofbiz < [hidden email]> wrote: > > Hi Deepak, > Thanks for u r reply. I have written the below code now its working fine. > > <entity-condition entity-name="FinAccount" list="finAccountList"> > <condition-expr field-name="finAccountId" > from-field="newEntity.finAccountId"/> > </entity-condition> > <iterate entry="finAccount" list="finAccountList"> > <set field="createAcctgTransEntryParams.glAccountId" > from-field="finAccount.postToGlAccountId"/> > <set field="createAcctgTransEntryParams.currencyUomId" > from-field="finAccount.currencyUomId"/> > <set field="createAcctgTransEntryParams.origCurrencyUomId" > from-field="finAccount.currencyUomId"/> > </iterate> > Regards, > Prasanthi > -- > View this message in context: > http://ofbiz.135035.n4.nabble.com/Not-able-to-navigate-to-a-screen-tp2221044p2222787.html > Sent from the OFBiz - User mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |