Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Transaction Patterns » add1 in shared account
add1 in shared account [message #5347] Thu, 28 January 2016 05:35 Go to previous message
htManager is currently offline  htManager
Messages: 433
Registered: May 2014
Senior Member
Hello Tony,

is it possible to insert records from a normal account in a shared account?

I have a contact-pool table where all new inserted records should be available for everyone. I want to do this by changing the key values in $fieldarray[] (user_id, user_seq_no, rdcaccount_id) in the _cm_getInitialData() method in the class file.

function _cm_getInitialData ($fieldarray)
{
// get next available number for user_seq_no for user HTM
$where = "user_id='HTM'";
$query = "SELECT max(user_seq_no) FROM $this->tablename WHERE $where";
$count = $this->getCount($query);
$fieldarray['user_id'] = 'HTM';
$fieldarray['user_seq_no'] = $count + 1;
$fieldarray['rdcaccount_id'] = '1';

return $fieldarray;

} // _cm_getInitialData

But when pressing the New button I get the following error message: [rdcaccount_id] User's account (4) is not compatible with record's account (1)
When commenting out $fieldarray['rdcaccount_id'] the add1 task works fine with the next available user_seq_no for user HTM but with rdcaccount=(4).

So is there a possibility to realize that?
 
Read Message
Read Message
Read Message
Previous Topic: Del1 - no table name in query
Next Topic: PopUp - Selection criteria
Goto Forum:
  


Current Time: Mon Nov 18 10:41:32 EST 2024

Total time taken to generate the page: 0.01068 seconds