Jump to content

Recommended Posts

Posted (edited)

Hi, I created a smart rule where it requires that you NEED to put a Vendor ID in a Journal Entry if the GL account is between the account 56001-59999 as such:

{!GLENTRY.ACCOUNTNO!} < '56001' || {!GLENTRY.ACCOUNTNO!} > '59999' || {!GLENTRY.VENDORID!} != ""

However I want to now include in this rule that you need to put a Vendor ID in the Journal entry if the GL account is between 56001-59999 EXCEPT 58301, meaning I want 58301 to be submitted without requiring a Vendor ID but the rest of 56001-59999 still needs to.

Edited by Nikesh Kadawathage
Putting tags
Posted

Writing a smart event can be tricky when it gets more complicated - either use the idea Louis outlined or try a trigger against the GL Entry object of type validation.

JavaScript can be written in the formula box for the condition and return either a string containing the error message that will stop the transaction posting, or null to let it through.  Something like the following should work for you:

if ("{!GLENTRY.ACCOUNTNO!}" >= "56001" 
	&& "{!GLENTRY.ACCOUNTNO!}" <= "59999" 
	&& "{!GLENTRY.ACCOUNTNO!}" != "58301" 
	&& "{!GLENTRY.VENDORID!}" == ""){
	return "This is not allowed! Line " + "{!GLENTRY.LINE_NO!}" + " needs a supplier.";
}
return null;

More information on triggers can be found here:  https://developer.intacct.com/platform-services/triggers-examples/

  • Thanks 1
Posted

You can do this with standard functionality.  On a GL account in the 'Require dimensions' section, check Vendor.  The benefit of this is that this setting will apply across other modules such as AP Invoice, not just journal entry.  If your rule needs to cover GL accounts that don't currently exist, then you could put a trigger on the GL account to set Vendor to true if it falls within your range of accounts.

  • Like 2
×
×
  • Create New...