No announcement yet.

Custom field inside module

  • Filter
  • Time
  • Show
Clear All
new posts

  • Custom field inside module

    I am attempting to write my own module that access some custom customer information. I currently have these two variables stored inside a custom fields group. I am able to access these values inside the page just fine however i cant seem to find any information about accessing them from inside my module. I understand that this is not ideal because it makes the module not be "one click" setup and uninstall. However i just started learning mivascript a week ago and found this would be the path of least resistance (so far) to test the concept. Eventually i would love to create a new table inside my module that holds the information for each customer however i am not sure exactly how to make a table that iterates thru all customers and stores their information. I was curious if anyone could help me out on one or both. Thank you

  • Since writing this post i have discovered that i can access other modules by using bracket g.'ModuleName'.FunctionName EX: I used [g.customfld].Read_Customer_ID(customer id, custom field). It was accessing customflds and calling the function however i was getting an MvDo error referencing a module might be corrupt. It was always flagging the module that initially called my module. (fulfill and not_order)
    I ended up going a different route instead where i create a second table that stores all the customer information instead of using custom fields. In turn i needed to add the component feature so i can access these variables on a page. So im kinda stuck again wondering when i should add customers to this table. If i am not mistaken i can check inside the component function "ComponentModule_Render_Start" if the current customer is already inside the table, and if not add them? This way the only time someone is added to the table is if they are interested in taking advantage of this feature. Anyone have any insight into this?
    Last edited by Rick Wilson; 10-17-17, 08:58 AM.