cancel
Showing results for 
Search instead for 
Did you mean: 

Unassign branches for customers and vendors

ahmad-hamad
Explorer
0 Kudos

Dears ,

how to unassign branches for all customers then assign the default branch for each customer with DTW .

the system automaticlly assign all branches to all customers and vendors , although i have uncheck the auto assign option in the general settings before i upload them .

Regards.

Accepted Solutions (1)

Accepted Solutions (1)

ANKIT_CHAUHAN
Product and Topic Expert
Product and Topic Expert

Hi ahmad-hamad,

Kindly note the following:

  • If you are adding new Business Partners without CRD8 template, then all active branches will be assigned to the Business Partners.
  • When updating BPBranchAssignment, LineNum is necessary. The value should be an integer which begins with 0.
  • It is not possible to delete records using DTW, only importing new records or updating existing ones are supported. It means, if the Business Partner already exists in database and all branches are checked, then it is not possible to delete(uncheck) branch by updating Business Partner via DTW. This can only be done using SAP Business One SDK as below:
SAPbobsCOM.BusinessPartners oBP;
oBP =(SAPbobsCOM.BusinessPartners)oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oBusinessPartners);
oBP.GetByKey("002");
oBP.BPBranchAssignment.SetCurrentLine(2);
oBP.BPBranchAssignment.Delete();
oBP.BPBranchAssignment.SetCurrentLine(1);
oBP.BPBranchAssignment.Delete();
int rs = oBP.Update();

Hope it helps!

Kind regards,

ANKIT CHAUHAN

SAP Business One Support

ahmad-hamad
Explorer

Hi Ankit ,

thank you for your reply ,

i had to remove the customers and add them again with CRD8 Template , it works fine .

Regards.

Answers (0)