Hi
I have 2 picklist fields in an Object called Associations, toRelationship and fromRelationship. When I create a new record the values save no issue. If I go into the edit form the values are cleared out. There is no scripts running to affect those fields at all?? Seems like a bug to me but cant pin point any issue. Its standard product.
Hello,
May I know the Rollbase version you are using? I just tested this in 3.0.5 and is working as expected. May I know the integration name, code and values for both picklist as well.
Thank you,
Gian
Object Name: Association
Field 1: fromRelationship Value: {D}Related|related
Field 2: toRelationship Value: {D}Related|related
System Information - 3.0.5.0
Rollbase Version - 3.1.3.0
Hello,
I just tested this with the same integration name and it works fine. Can you check if there are triggers running in that object?
Thank you,
Gian
There are 3 triggers:
One after create that creates a related record using a conversion map, creating another record in the Association table:
After Update Trigger:
var fromAcc = {!associationFromAccount}; var toAcc = {!associationToAccount}; var assocRecId = rbv_api.selectQuery("select id from association where associationToAccount = ? and associationFromAccount = ?", 1, fromAcc, toAcc); var arr = new Array(); arr['toDescription'] = '{!fromDescription}'; arr['fromDescription'] = '{!toDescription}'; arr['associationToAccount'] = '{!associationFromAccount#id}'; arr['toRelationship'] = '{!fromRelationship#id}'; arr['associationFromAccount'] = '{!associationToAccount#id}'; arr['fromRelationship'] = '{!toRelationship#id}'; rbv_api.println(assocRecId[0][0]); rbv_api.updateRecord("association", assocRecId[0][0], arr);
Before Delete:
var fromAcc = {!associationFromAccount}; var toAcc = {!associationToAccount}; //rbv_api.println(fromAcc + "|" + toAcc); var assocRecId = rbv_api.selectQuery("select id from association where associationToAccount = ? and associationFromAccount = ?", 1, fromAcc, toAcc); //rbv_api.printArr(assocRecId); rbv_api.println(assocRecId[0][0]); rbv_api.deleteRecord('association', assocRecId[0][0]);
Hello,
There is a problem with this code:
arr['toRelationship'] = '{!fromRelationship#id}';
arr['fromRelationship'] = '{!toRelationship#id}';
Using #id from different picklist will not work since each picklist uses different ID's generated by Rollbase. Try changing this to [tag:code] instead since both picklist are using the same code.
Thank you,
Gian
Hi Gian, thanks so much. Worked